Compare commits

...

6 Commits

Author SHA1 Message Date
Phil Elwell
4f2808f409 fixup! serial: 8250: Add NOMSI bug for bcm2835aux 2025-10-15 15:01:32 +01:00
Maxime Ripard
32a195668d media: tc358743: Fix the RGB MBUS format
Upstream series https://lore.kernel.org/linux-media/20250917-csi-bgr-rgb-v3-0-0145571b3aa4@kernel.org/

The tc358743 is an HDMI to MIPI-CSI2 bridge. It can output all three
HDMI 1.4 video formats: RGB 4:4:4, YCbCr 4:2:2, and YCbCr 4:4:4.

RGB 4:4:4 is converted to the MIPI-CSI2 RGB888 video format, and listed
in the driver as MEDIA_BUS_FMT_RGB888_1X24.

Most CSI2 receiver drivers then map MEDIA_BUS_FMT_RGB888_1X24 to
V4L2_PIX_FMT_RGB24.

However, V4L2_PIX_FMT_RGB24 is defined as having its color components in
the R, G and B order, from left to right. MIPI-CSI2 however defines the
RGB888 format with blue first.

This essentially means that the R and B will be swapped compared to what
V4L2_PIX_FMT_RGB24 defines.

The proper MBUS format would be BGR888, so let's use that.

Fixes: d32d98642d ("[media] Driver for Toshiba TC358743 HDMI to CSI-2 bridge")
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2025-10-15 14:34:15 +01:00
Maxime Ripard
696bf366c8 media: uapi: Clarify MBUS color component order for serial buses
Upstream series https://lore.kernel.org/linux-media/20250917-csi-bgr-rgb-v3-0-0145571b3aa4@kernel.org/

The subdev format documentation has a subsection describing how to use
the media bus pixel codes for serial buses. While it describes the
sampling part well, it doesn't really describe the current convention
used for the components order.

Let's improve that.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
2025-10-15 14:34:15 +01:00
Jonathan Bell
37293dae98 usb: dwc2: masquerade split-interrupt transfers
Masquerading Interrupt split transfers as Control puts the transfer into
the non-periodic handler in the hub. This stops the hub dropping
complete-split data in the microframe after a CSPLIT should have
arrived, improving resilience to host IRQ latency. Devices are none
the wiser - the handshake tokens are the same.

Originally devised by Hans Petter Selasky @ FreeBSD.

(v2: dwc2 needs an un-masquerade prior to channel interrupt handling)

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2025-10-15 14:34:15 +01:00
Ram Chandrasekar
893d345f9a drivers: thermal: step_wise: add support for hysteresis
Step wise governor increases the mitigation level when the temperature
goes above a threshold and will decrease the mitigation when the
temperature falls below the threshold. If it were a case, where the
temperature hovers around a threshold, the mitigation will be applied
and removed at every iteration. This reaction to the temperature is
inefficient for performance.

The use of hysteresis temperature could avoid this ping-pong of
mitigation by relaxing the mitigation to happen only when the
temperature goes below this lower hysteresis value.

Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

drivers: thermal: step_wise: avoid throttling at hysteresis temperature after dropping below it

Signed-off-by: Serge Schneider <serge@raspberrypi.org>

Fix hysteresis support in gov_step_wise.c

Directly get hyst value instead of going through an
optional and, now, unimplemented function.

Signed-off-by: Jürgen Kreileder <jk@blackdown.de>
2025-10-15 14:34:15 +01:00
Phil Elwell
5861d5a61a configs: Restore some dropped config settings
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2025-10-15 13:29:27 +01:00
11 changed files with 115 additions and 56 deletions

View File

@@ -160,12 +160,14 @@ correspondence between them.
The media bus pixel codes document parallel formats. Should the pixel data be
transported over a serial bus, the media bus pixel code that describes a
parallel format that transfers a sample on a single clock cycle is used. For
instance, both MEDIA_BUS_FMT_BGR888_1X24 and MEDIA_BUS_FMT_BGR888_3X8 are used
on parallel busses for transferring an 8 bits per sample BGR data, whereas on
serial busses the data in this format is only referred to using
MEDIA_BUS_FMT_BGR888_1X24. This is because there is effectively only a single
way to transport that format on the serial busses.
parallel format that transfers a sample on a single clock cycle is used. The
color component order used is the same used on the serial bus. For instance,
both MEDIA_BUS_FMT_BGR888_1X24 and MEDIA_BUS_FMT_BGR888_3X8 are used on parallel
busses for transferring an 8 bits per sample BGR data, whereas on serial busses
the data in this format is only referred to using MEDIA_BUS_FMT_BGR888_1X24,
with BGR meaning that the blue component is transmitted first, then green, then
red. This is because there is effectively only a single way to transport that
format on the serial busses.
Packed RGB Formats
^^^^^^^^^^^^^^^^^^

View File

@@ -56,7 +56,6 @@ CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y
# CONFIG_SUSPEND is not set
CONFIG_PM=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
@@ -308,7 +307,6 @@ CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_IP_SCTP=m
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
CONFIG_ATM=m
CONFIG_L2TP=m
CONFIG_L2TP_V3=y
@@ -608,7 +606,6 @@ CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=m
CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_CAP11XX=m
@@ -761,6 +758,7 @@ CONFIG_BCM2835_WDT=y
CONFIG_MFD_RASPBERRYPI_POE_HAT=m
CONFIG_MFD_STMPE=y
CONFIG_STMPE_SPI=y
CONFIG_MFD_WL1273_CORE=m
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_MFD_ARIZONA_SPI=m
CONFIG_MFD_WM5102=y
@@ -917,7 +915,6 @@ CONFIG_RADIO_SHARK2=m
CONFIG_RADIO_SI4713=m
CONFIG_RADIO_TEA5764=m
CONFIG_RADIO_TEF6862=m
CONFIG_RADIO_WL1273=m
CONFIG_USB_DSBR=m
CONFIG_USB_KEENE=m
CONFIG_USB_MA901=m
@@ -1464,6 +1461,8 @@ CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
CONFIG_XFS_SUPPORT_V4=y
CONFIG_XFS_SUPPORT_ASCII_CI=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
@@ -1474,9 +1473,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_NILFS2_FS=m
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_BCACHEFS_FS=m
CONFIG_BCACHEFS_QUOTA=y
CONFIG_BCACHEFS_POSIX_ACL=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FANOTIFY=y
CONFIG_QFMT_V1=m
@@ -1590,6 +1586,7 @@ CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ADIANTUM=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_LZ4=m

View File

@@ -50,7 +50,6 @@ CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
CONFIG_VFP=y
# CONFIG_SUSPEND is not set
CONFIG_PM=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
@@ -302,7 +301,6 @@ CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_IP_SCTP=m
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
CONFIG_ATM=m
CONFIG_L2TP=m
CONFIG_L2TP_V3=y
@@ -602,7 +600,6 @@ CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=m
CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_CAP11XX=m
@@ -754,6 +751,7 @@ CONFIG_BCM2835_WDT=y
CONFIG_MFD_RASPBERRYPI_POE_HAT=m
CONFIG_MFD_STMPE=y
CONFIG_STMPE_SPI=y
CONFIG_MFD_WL1273_CORE=m
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_MFD_ARIZONA_SPI=m
CONFIG_MFD_WM5102=y
@@ -910,7 +908,6 @@ CONFIG_RADIO_SHARK2=m
CONFIG_RADIO_SI4713=m
CONFIG_RADIO_TEA5764=m
CONFIG_RADIO_TEF6862=m
CONFIG_RADIO_WL1273=m
CONFIG_USB_DSBR=m
CONFIG_USB_KEENE=m
CONFIG_USB_MA901=m
@@ -1456,6 +1453,8 @@ CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
CONFIG_XFS_SUPPORT_V4=y
CONFIG_XFS_SUPPORT_ASCII_CI=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
@@ -1466,9 +1465,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_NILFS2_FS=m
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_BCACHEFS_FS=m
CONFIG_BCACHEFS_QUOTA=y
CONFIG_BCACHEFS_POSIX_ACL=y
CONFIG_FANOTIFY=y
CONFIG_QFMT_V1=m
CONFIG_QFMT_V2=m
@@ -1584,6 +1580,7 @@ CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_XTS=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_LZ4=m

View File

@@ -329,7 +329,6 @@ CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_IP_SCTP=m
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
CONFIG_ATM=m
CONFIG_L2TP=m
CONFIG_L2TP_V3=y
@@ -676,7 +675,6 @@ CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=m
CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_CAP11XX=m
@@ -772,6 +770,7 @@ CONFIG_PPS_CLIENT_LDISC=m
CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PINCTRL_MCP23S08=m
CONFIG_PINCTRL_RP1=y
CONFIG_PINCTRL_BRCMSTB=y
CONFIG_PINCTRL_BCM2712=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_BCM_VIRT=y
@@ -842,6 +841,7 @@ CONFIG_MFD_RASPBERRYPI_POE_HAT=m
CONFIG_MFD_STMPE=y
CONFIG_STMPE_SPI=y
CONFIG_MFD_SYSCON=y
CONFIG_MFD_WL1273_CORE=m
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_MFD_ARIZONA_SPI=m
CONFIG_MFD_WM5102=y
@@ -1002,7 +1002,6 @@ CONFIG_RADIO_SHARK2=m
CONFIG_RADIO_SI4713=m
CONFIG_RADIO_TEA5764=m
CONFIG_RADIO_TEF6862=m
CONFIG_RADIO_WL1273=m
CONFIG_USB_DSBR=m
CONFIG_USB_KEENE=m
CONFIG_USB_MA901=m
@@ -1587,6 +1586,8 @@ CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
CONFIG_XFS_SUPPORT_V4=y
CONFIG_XFS_SUPPORT_ASCII_CI=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
@@ -1597,9 +1598,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_NILFS2_FS=m
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_BCACHEFS_FS=m
CONFIG_BCACHEFS_QUOTA=y
CONFIG_BCACHEFS_POSIX_ACL=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FANOTIFY=y
CONFIG_QFMT_V1=m
@@ -1714,6 +1712,7 @@ CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ADIANTUM=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_LZ4=m

View File

@@ -329,7 +329,6 @@ CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_IP_SCTP=m
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
CONFIG_ATM=m
CONFIG_L2TP=m
CONFIG_L2TP_V3=y
@@ -676,7 +675,6 @@ CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=m
CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_CAP11XX=m
@@ -772,6 +770,7 @@ CONFIG_PPS_CLIENT_LDISC=m
CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PINCTRL_MCP23S08=m
CONFIG_PINCTRL_RP1=y
CONFIG_PINCTRL_BRCMSTB=y
CONFIG_PINCTRL_BCM2712=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_BCM_VIRT=y
@@ -842,6 +841,7 @@ CONFIG_MFD_RASPBERRYPI_POE_HAT=m
CONFIG_MFD_STMPE=y
CONFIG_STMPE_SPI=y
CONFIG_MFD_SYSCON=y
CONFIG_MFD_WL1273_CORE=m
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_MFD_ARIZONA_SPI=m
CONFIG_MFD_WM5102=y
@@ -1001,7 +1001,6 @@ CONFIG_RADIO_SHARK2=m
CONFIG_RADIO_SI4713=m
CONFIG_RADIO_TEA5764=m
CONFIG_RADIO_TEF6862=m
CONFIG_RADIO_WL1273=m
CONFIG_USB_DSBR=m
CONFIG_USB_KEENE=m
CONFIG_USB_MA901=m
@@ -1585,6 +1584,8 @@ CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
CONFIG_XFS_SUPPORT_V4=y
CONFIG_XFS_SUPPORT_ASCII_CI=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
@@ -1595,9 +1596,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_NILFS2_FS=m
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_BCACHEFS_FS=m
CONFIG_BCACHEFS_QUOTA=y
CONFIG_BCACHEFS_POSIX_ACL=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FANOTIFY=y
CONFIG_QFMT_V1=m
@@ -1712,6 +1710,7 @@ CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ADIANTUM=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_LZ4=m

View File

@@ -332,7 +332,6 @@ CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_IP_SCTP=m
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
CONFIG_ATM=m
CONFIG_L2TP=m
CONFIG_L2TP_V3=y
@@ -679,7 +678,6 @@ CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=m
CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_CAP11XX=m
@@ -774,6 +772,7 @@ CONFIG_PPS_CLIENT_LDISC=m
CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PINCTRL_MCP23S08=m
CONFIG_PINCTRL_RP1=y
CONFIG_PINCTRL_BRCMSTB=y
CONFIG_PINCTRL_BCM2712=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_BCM_VIRT=y
@@ -844,6 +843,7 @@ CONFIG_MFD_RASPBERRYPI_POE_HAT=m
CONFIG_MFD_STMPE=y
CONFIG_STMPE_SPI=y
CONFIG_MFD_SYSCON=y
CONFIG_MFD_WL1273_CORE=m
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_MFD_ARIZONA_SPI=m
CONFIG_MFD_WM5102=y
@@ -1004,7 +1004,6 @@ CONFIG_RADIO_SHARK2=m
CONFIG_RADIO_SI4713=m
CONFIG_RADIO_TEA5764=m
CONFIG_RADIO_TEF6862=m
CONFIG_RADIO_WL1273=m
CONFIG_USB_DSBR=m
CONFIG_USB_KEENE=m
CONFIG_USB_MA901=m
@@ -1589,6 +1588,8 @@ CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
CONFIG_XFS_SUPPORT_V4=y
CONFIG_XFS_SUPPORT_ASCII_CI=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
@@ -1599,9 +1600,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_NILFS2_FS=m
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_BCACHEFS_FS=m
CONFIG_BCACHEFS_QUOTA=y
CONFIG_BCACHEFS_POSIX_ACL=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FANOTIFY=y
CONFIG_QFMT_V1=m
@@ -1716,6 +1714,7 @@ CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ADIANTUM=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_LZ4=m

View File

@@ -756,6 +756,7 @@ static void tc358743_set_ref_clk(struct v4l2_subdev *sd)
static void tc358743_set_csi_color_space(struct v4l2_subdev *sd)
{
struct tc358743_state *state = to_state(sd);
struct device *dev = &state->i2c_client->dev;
switch (state->mbus_fmt_code) {
case MEDIA_BUS_FMT_UYVY8_1X16:
@@ -771,7 +772,17 @@ static void tc358743_set_csi_color_space(struct v4l2_subdev *sd)
mutex_unlock(&state->confctl_mutex);
break;
case MEDIA_BUS_FMT_RGB888_1X24:
v4l2_dbg(2, debug, sd, "%s: RGB 888 24-bit\n", __func__);
/*
* The driver was initially introduced with RGB888
* support, but CSI really means BGR.
*
* Since we might have applications that would have
* hard-coded the RGB888, let's support both.
*/
dev_warn_once(dev, "RGB format isn't actually supported by the hardware. The application should be fixed to use BGR.");
fallthrough;
case MEDIA_BUS_FMT_BGR888_1X24:
v4l2_dbg(2, debug, sd, "%s: BGR 888 24-bit\n", __func__);
i2c_wr8_and_or(sd, VOUT_SET2,
~(MASK_SEL422 | MASK_VOUT_422FIL_100) & 0xff,
0x00);
@@ -1432,11 +1443,26 @@ static int tc358743_log_status(struct v4l2_subdev *sd)
v4l2_info(sd, "Stopped: %s\n",
(i2c_rd16(sd, CSI_STATUS) & MASK_S_HLT) ?
"yes" : "no");
v4l2_info(sd, "Color space: %s\n",
state->mbus_fmt_code == MEDIA_BUS_FMT_UYVY8_1X16 ?
"YCbCr 422 16-bit" :
state->mbus_fmt_code == MEDIA_BUS_FMT_RGB888_1X24 ?
"RGB 888 24-bit" : "Unsupported");
switch (state->mbus_fmt_code) {
case MEDIA_BUS_FMT_BGR888_1X24:
/*
* The driver was initially introduced with RGB888
* support, but CSI really means BGR.
*
* Since we might have applications that would have
* hard-coded the RGB888, let's support both.
*/
case MEDIA_BUS_FMT_RGB888_1X24:
v4l2_info(sd, "Color space: BGR 888 24-bit\n");
break;
case MEDIA_BUS_FMT_UYVY8_1X16:
v4l2_info(sd, "Color space: YCbCr 422 16-bit\n");
break;
default:
v4l2_info(sd, "Color space: Unsupported\n");
break;
}
v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
v4l2_info(sd, "HDCP encrypted content: %s\n",
@@ -1773,11 +1799,18 @@ static int tc358743_enum_mbus_code(struct v4l2_subdev *sd,
{
switch (code->index) {
case 0:
code->code = MEDIA_BUS_FMT_RGB888_1X24;
code->code = MEDIA_BUS_FMT_BGR888_1X24;
break;
case 1:
code->code = MEDIA_BUS_FMT_UYVY8_1X16;
break;
case 2:
/*
* We need to keep RGB888 for backward compatibility,
* but we should list it last for userspace to pick BGR.
*/
code->code = MEDIA_BUS_FMT_RGB888_1X24;
break;
default:
return -EINVAL;
}
@@ -1787,6 +1820,7 @@ static int tc358743_enum_mbus_code(struct v4l2_subdev *sd,
static u32 tc358743_g_colorspace(u32 code)
{
switch (code) {
case MEDIA_BUS_FMT_BGR888_1X24:
case MEDIA_BUS_FMT_RGB888_1X24:
return V4L2_COLORSPACE_SRGB;
case MEDIA_BUS_FMT_UYVY8_1X16:
@@ -1824,7 +1858,8 @@ static int tc358743_set_fmt(struct v4l2_subdev *sd,
u32 code = format->format.code; /* is overwritten by get_fmt */
int ret = tc358743_get_fmt(sd, sd_state, format);
if (code == MEDIA_BUS_FMT_RGB888_1X24 ||
if (code == MEDIA_BUS_FMT_BGR888_1X24 ||
code == MEDIA_BUS_FMT_RGB888_1X24 ||
code == MEDIA_BUS_FMT_UYVY8_1X16)
format->format.code = code;
format->format.colorspace = tc358743_g_colorspace(format->format.code);
@@ -2244,7 +2279,7 @@ static int tc358743_probe(struct i2c_client *client)
if (err < 0)
goto err_hdl;
state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24;
state->mbus_fmt_code = MEDIA_BUS_FMT_BGR888_1X24;
sd->dev = &client->dev;

View File

@@ -17,13 +17,13 @@
#include "thermal_core.h"
/*
* If the temperature is higher than a trip point,
* If the temperature is higher than a hysteresis temperature,
* a. if the trend is THERMAL_TREND_RAISING, use higher cooling
* state for this trip point
* b. if the trend is THERMAL_TREND_DROPPING, use a lower cooling state
* for this trip point, but keep the cooling state above the applicable
* minimum
* If the temperature is lower than a trip point,
* If the temperature is lower than a hysteresis temperature,
* a. if the trend is THERMAL_TREND_RAISING, do nothing
* b. if the trend is THERMAL_TREND_DROPPING, use the minimum applicable
* cooling state for this trip point, or if the cooling state already
@@ -82,8 +82,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz,
const struct thermal_trip_desc *td,
int trip_threshold)
{
bool throttle = tz->temperature >= trip_threshold;
const struct thermal_trip *trip = &td->trip;
int hyst_temp = trip->temperature - trip->hysteresis;
bool throttle = tz->temperature >= hyst_temp;
enum thermal_trend trend = get_tz_trend(tz, trip);
int trip_id = thermal_zone_trip_id(tz, trip);
struct thermal_instance *instance;
@@ -91,13 +92,27 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz,
if (throttle)
trace_thermal_zone_trip(tz, trip_id, trip->type);
dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n",
trip_id, trip->type, trip_threshold, trend, throttle);
dev_dbg(&tz->device,
"Trip%d[type=%d,temp=%d,hyst=%d]:trend=%d,throttle=%d\n",
trip_id, trip->type, trip->temperature, hyst_temp, trend, throttle);
list_for_each_entry(instance, &td->thermal_instances, trip_node) {
int old_target;
old_target = instance->target;
throttle = false;
/*
* Lower the mitigation only if the temperature
* goes below the hysteresis temperature.
*/
if (tz->temperature >= trip->temperature ||
(tz->temperature >= hyst_temp &&
old_target == instance->upper)) {
throttle = true;
trace_thermal_zone_trip(tz, trip_id, trip->type);
}
instance->target = get_target_state(instance, trend, throttle);
dev_dbg(&instance->cdev->device, "old_target=%d, target=%ld\n",

View File

@@ -1399,7 +1399,7 @@ static void serial8250_stop_tx(struct uart_port *port)
{
struct uart_8250_port *up = up_to_u8250p(port);
guard(serial8250_rpm)(up);
serial8250_rpm_get(up);
__stop_tx(up);
/*
@@ -1409,6 +1409,10 @@ static void serial8250_stop_tx(struct uart_port *port)
up->acr |= UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
serial8250_rpm_put(up);
if (port->hw_stopped && (up->bugs & UART_BUG_NOMSI))
mod_timer(&up->timer, jiffies + 1);
}
static inline void __start_tx(struct uart_port *port)
@@ -2400,9 +2404,6 @@ void serial8250_do_shutdown(struct uart_port *port)
serial_port_in(port, UART_RX);
serial8250_rpm_put(up);
if (port->hw_stopped && (up->bugs & UART_BUG_NOMSI))
mod_timer(&up->timer, jiffies + 1);
up->ops->release_irq(up);
}
EXPORT_SYMBOL_GPL(serial8250_do_shutdown);

View File

@@ -676,6 +676,18 @@ static void dwc2_hc_init(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan)
hcchar |= HCCHAR_EPDIR;
if (chan->speed == USB_SPEED_LOW)
hcchar |= HCCHAR_LSPDDEV;
/*
* Masquerading Interrupt split transfers as Control puts the transfer
* into the non-periodic handler in the hub. This stops the hub
* dropping complete-split data in the microframe after a CSPLIT
* should have arrived, improving resilience to host IRQ latency.
* Devices are none the wiser - the handshake tokens are the same.
* The fakery is undone in dwc2_hc_n_intr().
*/
if (chan->do_split && chan->ep_type == USB_ENDPOINT_XFER_INT)
chan->ep_type = USB_ENDPOINT_XFER_CONTROL;
hcchar |= chan->ep_type << HCCHAR_EPTYPE_SHIFT & HCCHAR_EPTYPE_MASK;
hcchar |= chan->max_packet << HCCHAR_MPS_SHIFT & HCCHAR_MPS_MASK;
dwc2_writel(hsotg, hcchar, HCCHAR(hc_num));

View File

@@ -2048,6 +2048,9 @@ static void dwc2_hc_n_intr(struct dwc2_hsotg *hsotg, int chnum)
chan->hcint = hcintraw;
/* Un-masquerade the transfer type */
if (chan->do_split)
chan->ep_type = chan->qh->ep_type;
/*
* If the channel was halted due to a dequeue, the qtd list might
* be empty or at least the first entry will not be the active qtd.