include/linux/pci.h | 2 ++
3 files changed, 77 insertions(+), 8 deletions(-)
---- linux-6.4/drivers/pci/pcie/aspm.c.orig 2023-08-03 14:40:42.800427402 +0200
-+++ linux-6.4/drivers/pci/pcie/aspm.c 2023-08-03 14:44:34.622963310 +0200
-@@ -210,6 +210,44 @@
- return -ETIMEDOUT;
+--- linux-6.5/drivers/pci/pcie/aspm.c.orig 2023-08-27 23:49:51.000000000 +0200
++++ linux-6.5/drivers/pci/pcie/aspm.c 2023-08-29 19:04:58.069254559 +0200
+@@ -191,6 +191,44 @@
+ link->clkpm_disable = blacklist ? 1 : 0;
}
+static int pcie_downgrade_link_to_gen1(struct pci_dev *parent)
+ return 0;
+}
+
- static int pcie_retrain_link(struct pcie_link_state *link)
- {
- struct pci_dev *parent = link->pdev;
-@@ -226,6 +264,12 @@
- if (rc)
- return rc;
+ /*
+ * pcie_aspm_configure_common_clock: check if the 2 ends of a link
+ * could use common clock. If they are, configure them to use the
+@@ -257,7 +295,14 @@
+ reg16 &= ~PCI_EXP_LNKCTL_CCC;
+ pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
-+ if ((link->downstream->dev_flags & PCI_DEV_FLAGS_NO_RETRAIN_LINK_WHEN_NOT_GEN1) &&
-+ pcie_downgrade_link_to_gen1(parent)) {
-+ pci_err(parent, "ASPM: Retrain Link at higher speed is disallowed by quirk\n");
-+ return false;
+- if (pcie_retrain_link(link->pdev, true)) {
++ bool skip_retrain = false;
++ if (link->downstream->dev_flags & PCI_DEV_FLAGS_NO_RETRAIN_LINK_WHEN_NOT_GEN1) {
++ if (pcie_downgrade_link_to_gen1(parent)) {
++ pci_err(parent, "ASPM: Retrain Link at higher speed is disallowed by quirk\n");
++ skip_retrain = true;
++ }
+ }
-+
- pcie_capability_read_word(parent, PCI_EXP_LNKCTL, ®16);
- reg16 |= PCI_EXP_LNKCTL_RL;
- pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
++ if (!skip_retrain && pcie_retrain_link(link->pdev, true)) {
+
+ /* Training failed. Restore common clock configurations */
+ pci_err(parent, "ASPM: Could not configure common clock\n");
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 653660e3ba9e..4999ad9d08b8 100644
--- a/drivers/pci/quirks.c
COMMON_CLK_GXBB arm64=m
COMMON_CLK_AXG arm64=m
COMMON_CLK_AXG_AUDIO arm64=m
+COMMON_CLK_A1_PLL arm64=m
+COMMON_CLK_A1_PERIPHERALS arm64=m
COMMON_CLK_G12A arm64=m
#-
GPIO_TIMBERDALE all=y
GPIO_TPS65086 all=m
GPIO_TPS65218 all=m
+GPIO_TPS65219 arm=m arm64=m
GPIO_TPS65912 all=m
GPIO_TPS68470 all=m
GPIO_TQMX86 all=m
GPIO_BT8XX all=m
GPIO_MLXBF arm64=m
GPIO_MLXBF2 arm64=m
+GPIO_MLXBF3 arm64=m
GPIO_ML_IOH all=m
GPIO_PCH all=m
GPIO_PCI_IDIO_16 all=m
#-
DRM_MESON arm64=m
DRM_MESON_DW_HDMI arm64=m
+DRM_MESON_DW_MIPI_DSI arm64=m
#-
#- *** FILE: drivers/gpu/drm/mgag200/Kconfig ***
DRM_PANEL_SAMSUNG_DB7430 arm=m arm64=m
DRM_PANEL_SAMSUNG_S6D16D0 arm=m arm64=m
DRM_PANEL_SAMSUNG_S6D27A1 arm=m arm64=m
+DRM_PANEL_SAMSUNG_S6D7AA0 arm=m arm64=m
DRM_PANEL_SAMSUNG_S6E3HA2 arm=m arm64=m
DRM_PANEL_SAMSUNG_S6E63J0X03 arm=m arm64=m
DRM_PANEL_SAMSUNG_S6E63M0 arm=m arm64=m
MFD_MADERA all=m
MFD_MADERA_I2C all=m
MFD_MADERA_SPI all=m
+MFD_MAX5970 arm=m arm64=m
MFD_CS47L15 all=y
MFD_CS47L35 all=y
MFD_CS47L85 all=y
MFD_RT4831=m
MFD_RT5033 all=m
MFD_RT5120 all=m
+MFD_RK8XX_I2C arm=m arm64=m
+MFD_RK8XX_SPI arm=m arm64=m
MFD_RN5T618 all=m
MFD_SI476X_CORE all=m
MFD_SIMPLE_MFD_I2C all=m
#- *** FILE: drivers/net/ethernet/microchip/lan966x/Kconfig ***
#-
LAN966X_SWITCH arm=m arm64=m
+LAN966X_DCB arm=y arm64=y
#-
#- *** FILE: drivers/net/ethernet/microchip/vcap/Kconfig ***
REGULATOR_TPS6105X all=m
REGULATOR_TPS62360 all=m
REGULATOR_TPS6286X arm=m arm64=m
+REGULATOR_TPS6287X arm=m arm64=m
REGULATOR_TPS65023 all=m
REGULATOR_TPS6507X all=m
REGULATOR_TPS65086 all=m
REGULATOR_TPS65217 all=m
REGULATOR_TPS65218 arm=m arm64=m
REGULATOR_TPS65219 arm=m arm64=m
+REGULATOR_TPS6594 arm=m arm64=m
REGULATOR_TPS6524X all=m
REGULATOR_TPS6586X all=m
REGULATOR_TPS65912 all=m
#- file drivers/vfio/cdx/Kconfig goes here
#- file virt/lib/Kconfig goes here
+#-
+#- *** FILE: drivers/vfio/cdx/Kconfig ***
+#-
+VFIO_CDX arm64=m
+
#-
#- *** FILE: drivers/vfio/mdev/Kconfig ***
#-
WM831X_WATCHDOG all=m
WM8350_WATCHDOG all=m
XILINX_WATCHDOG all=m
+XILINX_WINDOW_WATCHDOG arm64=m
ZIIRAVE_WATCHDOG all=m
RAVE_SP_WATCHDOG all=m
MLX_WDT all=m
SND_SOC_IDT821034 all=m
SND_SOC_INNO_RK3036 all=m
SND_SOC_MAX98088 all=m
-SND_SOC_MAX98090 arm=m
+SND_SOC_MAX98090 arm=m arm64=m
SND_SOC_MAX98095 all=m
SND_SOC_MAX98357A all=m
SND_SOC_MAX98504 all=m
SND_SOC_SSM2518=m
SND_SOC_SSM2602_SPI all=m
SND_SOC_SSM2602_I2C all=m
+SND_SOC_SSM3515 arm=m arm64=m
SND_SOC_SSM4567 all=m
SND_SOC_STA32X all=m
SND_SOC_STA350 all=m
+++ b/drivers/media/v4l2-core/v4l2-common.c
@@ -262,6 +262,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format)
/* YUV planar formats */
- { .format = V4L2_PIX_FMT_NV12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 2 },
- { .format = V4L2_PIX_FMT_NV21, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 2 },
-+ { .format = V4L2_PIX_FMT_NV15, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .hdiv = 2, .vdiv = 2,
+ { .format = V4L2_PIX_FMT_NV12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },
+ { .format = V4L2_PIX_FMT_NV21, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },
++ { .format = V4L2_PIX_FMT_NV15, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2,
+ .block_w = { 4, 2, 0, 0 }, .block_h = { 1, 1, 0, 0 } },
- { .format = V4L2_PIX_FMT_NV16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 1 },
- { .format = V4L2_PIX_FMT_NV61, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 1 },
- { .format = V4L2_PIX_FMT_NV24, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 1, .vdiv = 1 },
+ { .format = V4L2_PIX_FMT_NV16, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 },
+ { .format = V4L2_PIX_FMT_NV61, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 },
+ { .format = V4L2_PIX_FMT_NV24, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 },
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 8e0a0ff62a70..1c80ad78ef00 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
if (info->mem_planes == 1) {
plane = &pixfmt->plane_fmt[0];
-- plane->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0];
+- plane->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0] / info->bpp_div[0];
+ plane->bytesperline = v4l2_format_plane_width(info, 0, width);
plane->sizeimage = 0;
-
- plane->sizeimage += info->bpp[i] *
- DIV_ROUND_UP(aligned_width, hdiv) *
-- DIV_ROUND_UP(aligned_height, vdiv);
+- DIV_ROUND_UP(aligned_height, vdiv) / info->bpp_div[i];
- }
+ for (i = 0; i < info->comp_planes; i++)
+ plane->sizeimage +=
-
plane = &pixfmt->plane_fmt[i];
plane->bytesperline =
-- info->bpp[i] * DIV_ROUND_UP(aligned_width, hdiv);
+- info->bpp[i] * DIV_ROUND_UP(aligned_width, hdiv) / info->bpp_div[i];
- plane->sizeimage =
- plane->bytesperline * DIV_ROUND_UP(aligned_height, vdiv);
+ v4l2_format_plane_width(info, i, width);
pixfmt->width = width;
pixfmt->height = height;
pixfmt->pixelformat = pixelformat;
-- pixfmt->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0];
+- pixfmt->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0] / info->bpp_div[0];
+ pixfmt->bytesperline = v4l2_format_plane_width(info, 0, width);
pixfmt->sizeimage = 0;
-
- pixfmt->sizeimage += info->bpp[i] *
- DIV_ROUND_UP(aligned_width, hdiv) *
-- DIV_ROUND_UP(aligned_height, vdiv);
+- DIV_ROUND_UP(aligned_height, vdiv) / info->bpp_div[i];
- }
+ for (i = 0; i < info->comp_planes; i++)
+ pixfmt->sizeimage +=