Re: [PATCH v2 3/8] fbdev: Do not include in header
Hi Thomas, kernel test robot noticed the following build warnings: [auto build test WARNING on staging/staging-testing] [also build test WARNING on staging/staging-next staging/staging-linus drm-misc/drm-misc-next linus/master v6.8-rc4 next-20240216] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/drm-nouveau-Include-linux-backlight-h/20240213-164639 base: staging/staging-testing patch link: https://lore.kernel.org/r/20240213084403.20995-4-tzimmermann%40suse.de patch subject: [PATCH v2 3/8] fbdev: Do not include in header config: arm-spitz_defconfig (https://download.01.org/0day-ci/archive/20240218/202402181344.8xwxj6fv-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240218/202402181344.8xwxj6fv-...@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202402181344.8xwxj6fv-...@intel.com/ All warnings (new ones prefixed by >>): drivers/video/backlight/corgi_lcd.c: In function 'corgi_bl_get_intensity': drivers/video/backlight/corgi_lcd.c:390:33: error: implicit declaration of function 'bl_get_data'; did you mean 'lcd_get_data'? [-Werror=implicit-function-declaration] 390 | struct corgi_lcd *lcd = bl_get_data(bd); | ^~~ | lcd_get_data >> drivers/video/backlight/corgi_lcd.c:390:33: warning: initialization of >> 'struct corgi_lcd *' from 'int' makes pointer from integer without a cast >> [-Wint-conversion] drivers/video/backlight/corgi_lcd.c: In function 'corgi_bl_update_status': drivers/video/backlight/corgi_lcd.c:422:33: warning: initialization of 'struct corgi_lcd *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 422 | struct corgi_lcd *lcd = bl_get_data(bd); | ^~~ drivers/video/backlight/corgi_lcd.c:423:25: error: implicit declaration of function 'backlight_get_brightness' [-Werror=implicit-function-declaration] 423 | int intensity = backlight_get_brightness(bd); | ^~~~ drivers/video/backlight/corgi_lcd.c: In function 'corgi_lcd_limit_intensity': drivers/video/backlight/corgi_lcd.c:441:9: error: implicit declaration of function 'backlight_update_status' [-Werror=implicit-function-declaration] 441 | backlight_update_status(the_corgi_lcd->bl_dev); | ^~~ drivers/video/backlight/corgi_lcd.c: At top level: drivers/video/backlight/corgi_lcd.c:445:21: error: variable 'corgi_bl_ops' has initializer but incomplete type 445 | static const struct backlight_ops corgi_bl_ops = { | ^ drivers/video/backlight/corgi_lcd.c:446:10: error: 'const struct backlight_ops' has no member named 'get_brightness' 446 | .get_brightness = corgi_bl_get_intensity, | ^~ >> drivers/video/backlight/corgi_lcd.c:446:27: warning: excess elements in >> struct initializer 446 | .get_brightness = corgi_bl_get_intensity, | ^~ drivers/video/backlight/corgi_lcd.c:446:27: note: (near initialization for 'corgi_bl_ops') drivers/video/backlight/corgi_lcd.c:447:10: error: 'const struct backlight_ops' has no member named 'update_status' 447 | .update_status = corgi_bl_update_status, | ^ drivers/video/backlight/corgi_lcd.c:447:27: warning: excess elements in struct initializer 447 | .update_status = corgi_bl_update_status, | ^~ drivers/video/backlight/corgi_lcd.c:447:27: note: (near initialization for 'corgi_bl_ops') drivers/video/backlight/corgi_lcd.c: In function 'corgi_lcd_probe': drivers/video/backlight/corgi_lcd.c:494:37: error: storage size of 'props' isn't known 494 | struct backlight_properties props; | ^ drivers/video/backlight/corgi_lcd.c:518:34: error: invalid application of 'sizeof' to incomplete type 'struct backlight_properties' 518 | memset(, 0, sizeof(struct backlight_properties)); | ^~ drivers/video/backlight/corgi_lcd.c:519:22: error: 'BACKLIGHT_RAW' undeclared (first use in this function); did you mean 'FB_BACKLIGHT_MAX'? 519 | props.type =
Re: [PATCH v4 16/19] drm/msm/dpu: modify encoder programming for CDM over DP
On Sat, 17 Feb 2024 at 01:03, Paloma Arellano wrote: > > Adjust the encoder format programming in the case of video mode for DP > to accommodate CDM related changes. > > Changes in v4: > - Remove hw_cdm check in dpu_encoder_needs_periph_flush() > - Remove hw_cdm check when getting the fmt_fourcc in > dpu_encoder_phys_vid_enable() > > Changes in v2: > - Move timing engine programming to a separate patch from this > one > - Move update_pending_flush_periph() invocation completely to > this patch > - Change the logic of dpu_encoder_get_drm_fmt() so that it only > calls drm_mode_is_420_only() instead of doing additional > unnecessary checks > - Create new functions msm_dp_needs_periph_flush() and it's > supporting function dpu_encoder_needs_periph_flush() to check > if the mode is YUV420 and VSC SDP is enabled before doing a > peripheral flush > > Signed-off-by: Paloma Arellano > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 35 +++ > .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 13 +++ > .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 16 + > drivers/gpu/drm/msm/dp/dp_display.c | 18 ++ > drivers/gpu/drm/msm/msm_drv.h | 17 - > 5 files changed, 98 insertions(+), 1 deletion(-) > Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry
Re: [PATCH 1/3] drm/ci: update IGT test names
On Sun, 18 Feb 2024 at 06:12, Dmitry Baryshkov wrote: > > Since the addition of testlist.txt the IGT has changed some of test > names. Some test names were changed to use '-' instead of '_'. In other > cases tests were just renamed. Follow those changes. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/ci/testlist.txt | 1888 ++- > 1 file changed, 844 insertions(+), 1044 deletions(-) Forgot to add: Reported-by: Rob Clark -- With best wishes Dmitry
[PATCH 3/3] drm/ci: mark universal-plane-sanity as failing on SC7180
The test kms_universal_plane@universal-plane-sanity fails on both SC7180 platforms. The drm/msm returns -ERANGE as it can not handle passet scaling range, however the test is not ready to handle that. Mark the test as failing until it is fixed. ERROR - Igt error: (kms_universal_plane:1554) CRITICAL: Test assertion failure function sanity_test_pipe, file ../tests/kms_universal_plane.c:438: ERROR - Igt error: (kms_universal_plane:1554) CRITICAL: Failed assertion: drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id, output->config.crtc->crtc_id, test.oversized_fb.fb_id, 0, 0, 0, mode->hdisplay + 100, mode->vdisplay + 100, IGT_FIXED(0,0), IGT_FIXED(0,0), IGT_FIXED(mode->hdisplay,0), IGT_FIXED(mode->vdisplay,0)) == expect ERROR - Igt error: (kms_universal_plane:1554) CRITICAL: Last errno: 34, Numerical result out of range Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt| 1 + .../drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt| 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt b/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt index 7e4d8744fcc6..f0576aa629e8 100644 --- a/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt +++ b/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-fails.txt @@ -15,3 +15,4 @@ kms_plane_alpha_blend@alpha-7efc,Fail kms_plane_alpha_blend@coverage-7efc,Fail kms_plane_alpha_blend@coverage-vs-premult-vs-constant,Fail kms_rmfb@close-fd,Fail +kms_universal_plane@universal-plane-sanity,Fail diff --git a/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt b/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt index 7e4d8744fcc6..f0576aa629e8 100644 --- a/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt +++ b/drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-fails.txt @@ -15,3 +15,4 @@ kms_plane_alpha_blend@alpha-7efc,Fail kms_plane_alpha_blend@coverage-7efc,Fail kms_plane_alpha_blend@coverage-vs-premult-vs-constant,Fail kms_rmfb@close-fd,Fail +kms_universal_plane@universal-plane-sanity,Fail -- 2.39.2
[PATCH 2/3] drm/ci: update msm-apq8096-fails list
Mark two tests as passing on the APQ8096 / db820c platform. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt b/drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt index 2cd49e8ee47f..88a1fc0a3b0d 100644 --- a/drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt +++ b/drivers/gpu/drm/ci/xfails/msm-apq8096-fails.txt @@ -1,4 +1,2 @@ kms_3d,Fail kms_addfb_basic@addfb25-bad-modifier,Fail -kms_force_connector_basic@force-edid,Fail -kms_hdmi_inject@inject-4k,Fail -- 2.39.2
[PATCH 1/3] drm/ci: update IGT test names
Since the addition of testlist.txt the IGT has changed some of test names. Some test names were changed to use '-' instead of '_'. In other cases tests were just renamed. Follow those changes. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/ci/testlist.txt | 1888 ++- 1 file changed, 844 insertions(+), 1044 deletions(-) diff --git a/drivers/gpu/drm/ci/testlist.txt b/drivers/gpu/drm/ci/testlist.txt index eaeb751bb0ad..3377f002f8c5 100644 --- a/drivers/gpu/drm/ci/testlist.txt +++ b/drivers/gpu/drm/ci/testlist.txt @@ -100,7 +100,7 @@ kms_atomic@plane-invalid-params-fence kms_atomic@crtc-invalid-params kms_atomic@crtc-invalid-params-fence kms_atomic@atomic-invalid-params -kms_atomic@atomic_plane_damage +kms_atomic@atomic-plane-damage kms_atomic_interruptible@legacy-setmode kms_atomic_interruptible@atomic-setmode kms_atomic_interruptible@legacy-dpms @@ -321,726 +321,726 @@ kms_bw@linear-tiling-7-displays-3840x2160p kms_bw@linear-tiling-8-displays-1920x1080p kms_bw@linear-tiling-8-displays-2560x1440p kms_bw@linear-tiling-8-displays-3840x2160p -kms_ccs@pipe-A-bad-pixel-format-y_tiled_ccs -kms_ccs@pipe-A-bad-pixel-format-yf_tiled_ccs -kms_ccs@pipe-A-bad-pixel-format-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-bad-pixel-format-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-bad-pixel-format-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-bad-pixel-format-4_tiled_dg2_rc_ccs -kms_ccs@pipe-A-bad-pixel-format-4_tiled_dg2_mc_ccs -kms_ccs@pipe-A-bad-pixel-format-4_tiled_dg2_rc_ccs_cc -kms_ccs@pipe-A-bad-pixel-format-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-bad-pixel-format-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-bad-pixel-format-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-bad-rotation-90-y_tiled_ccs -kms_ccs@pipe-A-bad-rotation-90-yf_tiled_ccs -kms_ccs@pipe-A-bad-rotation-90-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-bad-rotation-90-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-bad-rotation-90-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-bad-rotation-90-4_tiled_dg2_rc_ccs -kms_ccs@pipe-A-bad-rotation-90-4_tiled_dg2_mc_ccs -kms_ccs@pipe-A-bad-rotation-90-4_tiled_dg2_rc_ccs_cc -kms_ccs@pipe-A-bad-rotation-90-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-bad-rotation-90-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-bad-rotation-90-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-crc-primary-basic-y_tiled_ccs -kms_ccs@pipe-A-crc-primary-basic-yf_tiled_ccs -kms_ccs@pipe-A-crc-primary-basic-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-crc-primary-basic-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-crc-primary-basic-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-crc-primary-basic-4_tiled_dg2_rc_ccs -kms_ccs@pipe-A-crc-primary-basic-4_tiled_dg2_mc_ccs -kms_ccs@pipe-A-crc-primary-basic-4_tiled_dg2_rc_ccs_cc -kms_ccs@pipe-A-crc-primary-basic-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-crc-primary-basic-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-crc-primary-basic-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-crc-primary-rotation-180-y_tiled_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-yf_tiled_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-crc-primary-rotation-180-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-4_tiled_dg2_rc_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-4_tiled_dg2_mc_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-4_tiled_dg2_rc_ccs_cc -kms_ccs@pipe-A-crc-primary-rotation-180-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-crc-primary-rotation-180-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-random-ccs-data-y_tiled_ccs -kms_ccs@pipe-A-random-ccs-data-yf_tiled_ccs -kms_ccs@pipe-A-random-ccs-data-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-random-ccs-data-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-random-ccs-data-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-random-ccs-data-4_tiled_dg2_rc_ccs -kms_ccs@pipe-A-random-ccs-data-4_tiled_dg2_mc_ccs -kms_ccs@pipe-A-random-ccs-data-4_tiled_dg2_rc_ccs_cc -kms_ccs@pipe-A-random-ccs-data-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-random-ccs-data-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-random-ccs-data-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-missing-ccs-buffer-y_tiled_ccs -kms_ccs@pipe-A-missing-ccs-buffer-yf_tiled_ccs -kms_ccs@pipe-A-missing-ccs-buffer-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-missing-ccs-buffer-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-missing-ccs-buffer-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-missing-ccs-buffer-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-missing-ccs-buffer-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-ccs-on-another-bo-y_tiled_ccs -kms_ccs@pipe-A-ccs-on-another-bo-yf_tiled_ccs -kms_ccs@pipe-A-ccs-on-another-bo-y_tiled_gen12_rc_ccs -kms_ccs@pipe-A-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc -kms_ccs@pipe-A-ccs-on-another-bo-y_tiled_gen12_mc_ccs -kms_ccs@pipe-A-ccs-on-another-bo-4_tiled_mtl_rc_ccs -kms_ccs@pipe-A-ccs-on-another-bo-4_tiled_mtl_mc_ccs -kms_ccs@pipe-A-ccs-on-another-bo-4_tiled_mtl_rc_ccs_cc -kms_ccs@pipe-A-bad-aux-stride-y_tiled_ccs -kms_ccs@pipe-A-bad-aux-stride-yf_tiled_ccs
RE: [PATCH v16 3/5] drm: renesas: Add RZ/G2L DU Support
Hi Maxime Ripard, Thanks for the feedback. > -Original Message- > From: Maxime Ripard > Sent: Friday, February 9, 2024 3:07 PM > Subject: Re: [PATCH v16 3/5] drm: renesas: Add RZ/G2L DU Support > > On Mon, Jan 22, 2024 at 04:42:55PM +, Biju Das wrote: > > +static const struct drm_gem_object_funcs rzg2l_du_gem_funcs = { > > + .free = drm_gem_dma_object_free, > > + .print_info = drm_gem_dma_object_print_info, > > + .get_sg_table = drm_gem_dma_object_get_sg_table, > > + .vmap = drm_gem_dma_object_vmap, > > + .mmap = drm_gem_dma_object_mmap, > > + .vm_ops = _gem_dma_vm_ops, > > +}; > > + > > +struct drm_gem_object * > > +rzg2l_du_gem_prime_import_sg_table(struct drm_device *dev, > > + struct dma_buf_attachment *attach, > > + struct sg_table *sgt) > > +{ > > + struct drm_gem_dma_object *dma_obj; > > + struct drm_gem_object *gem_obj; > > + int ret; > > + > > + /* Create a DMA GEM buffer. */ > > + dma_obj = kzalloc(sizeof(*dma_obj), GFP_KERNEL); > > + if (!dma_obj) > > + return ERR_PTR(-ENOMEM); > > + > > + gem_obj = _obj->base; > > + gem_obj->funcs = _du_gem_funcs; > > + > > + drm_gem_private_object_init(dev, gem_obj, attach->dmabuf->size); > > + dma_obj->map_noncoherent = false; > > + > > + ret = drm_gem_create_mmap_offset(gem_obj); > > + if (ret) { > > + drm_gem_object_release(gem_obj); > > + kfree(dma_obj); > > + return ERR_PTR(ret); > > + } > > + > > + dma_obj->dma_addr = 0; > > + dma_obj->sgt = sgt; > > + > > + return gem_obj; > > +} > > It looks like you're just reusing the helpers there, why do you need to > declare a new import_sg_table implementation? It is not needed. I will remove it in the next version. Cheers, Biju
[PATCH] drm: rockchip: dw-mipi-dsi: Fix hsclk calculation for non-burst video modes
From: Ondrej Jirman For panels that don't use video burst mode, hsclock should match the pixel clock * bpp / lane exactly. This fixes display image corruption on Pinephone Pro, which doesn't use video burst mode to drive the panel. To simplify the addition of exact fout calculation for non-burst modes, the code is re-organized in order to not redo the same calculation multiple times, and to use identical algorithm for per-lane bitrate for internal and external dphy use cases. Signed-off-by: Ondrej Jirman --- .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 28 --- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 4cc8ed8f4fbd..7468324872ec 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -548,8 +548,6 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode, { struct dw_mipi_dsi_rockchip *dsi = priv_data; int bpp; - unsigned long mpclk, tmp; - unsigned int target_mbps = 1000; unsigned int max_mbps = dppa_map[ARRAY_SIZE(dppa_map) - 1].max_mbps; unsigned long best_freq = 0; unsigned long fvco_min, fvco_max, fin, fout; @@ -567,30 +565,28 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode, return bpp; } - mpclk = DIV_ROUND_UP(mode->clock, MSEC_PER_SEC); - if (mpclk) { - /* take 1 / 0.8, since mbps must big than bandwidth of RGB */ - tmp = mpclk * (bpp / lanes) * 10 / 8; - if (tmp < max_mbps) - target_mbps = tmp; - else - DRM_DEV_ERROR(dsi->dev, - "DPHY clock frequency is out of range\n"); + fout = mode->clock * bpp / lanes; + if (mode_flags & MIPI_DSI_MODE_VIDEO_BURST) + fout = fout * 10 / 8; + fout *= MSEC_PER_SEC; + + if (fout > max_mbps * USEC_PER_SEC) { + DRM_DEV_ERROR(dsi->dev, + "DPHY clock frequency is out of range\n"); + return -EINVAL; } - /* for external phy only a the mipi_dphy_config is necessary */ + /* for external phy only the mipi_dphy_config is necessary */ if (dsi->phy) { - phy_mipi_dphy_get_default_config(mode->clock * 1000 * 10 / 8, -bpp, lanes, + phy_mipi_dphy_get_default_config_for_hsclk(fout, lanes, >phy_opts.mipi_dphy); - dsi->lane_mbps = target_mbps; + dsi->lane_mbps = DIV_ROUND_UP(fout, USEC_PER_SEC); *lane_mbps = dsi->lane_mbps; return 0; } fin = clk_get_rate(dsi->pllref_clk); - fout = target_mbps * USEC_PER_SEC; /* constraint: 5Mhz <= Fref / N <= 40MHz */ min_prediv = DIV_ROUND_UP(fin, 40 * USEC_PER_SEC); -- 2.43.0
[PATCH] drm: rockchip: Don't require MIPI DSI device when it's used for ISP
From: Ondrej Jirman On RK3399 one MIPI DSI device can be alternatively used with the ISP1, to provide RX DPHY. When this is the case (ISP1 is enabled in device tree), probe success of DRM is tied to probe success of ISP1 connected camera sensor. This can fail if the user is able to killswitch the camera power, like on Pinephone Pro. Detect use of MIPI DSI controller by ISP, and don't include it in component match list in that case. Signed-off-by: Ondrej Jirman --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 47 + 1 file changed, 47 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index ab55d7132550..f47de94ad576 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -354,6 +354,43 @@ static void rockchip_drm_match_remove(struct device *dev) device_link_del(link); } +/* + * Check if ISP block linked to a mipi-dsi device via phys phandle is + * enabled in device tree. + */ +static bool rockchip_drm_is_mipi1_and_used_by_isp(struct device *dev) +{ + struct device_node *np = NULL, *phy_np; + + if (!of_device_is_compatible(dev->of_node, "rockchip,rk3399-mipi-dsi")) + return false; + + while (true) { + np = of_find_compatible_node(np, NULL, "rockchip,rk3399-cif-isp"); + if (!np) + break; + + if (!of_device_is_available(np)) { + of_node_put(np); + continue; + } + + phy_np = of_parse_phandle(np, "phys", 0); + if (!phy_np) { + of_node_put(np); + continue; + } + + of_node_put(phy_np); + of_node_put(np); + + if (phy_np == dev->of_node) + return true; + } + + return false; +} + static struct component_match *rockchip_drm_match_add(struct device *dev) { struct component_match *match = NULL; @@ -371,6 +408,16 @@ static struct component_match *rockchip_drm_match_add(struct device *dev) if (!d) break; + /* +* If mipi1 is connected to ISP, we don't want to wait for mipi1 component, +* because it will not be used by DRM anyway, to not tie success of camera +* driver probe to display pipeline initialization. +*/ + if (rockchip_drm_is_mipi1_and_used_by_isp(d)) { + dev_info(d, "used by ISP1, skipping from DRM\n"); + continue; + } + device_link_add(dev, d, DL_FLAG_STATELESS); component_match_add(dev, , component_compare_dev, d); } while (true); -- 2.43.0
Re: [PATCH 01/28] [NOT FOR REVIEW] drm: color pipeline base work
Hi Uma, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm/drm-next next-20240216] [cannot apply to drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.8-rc4] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Uma-Shankar/drm-color-pipeline-base-work/20240213-144544 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20240213064835.139464-2-uma.shankar%40intel.com patch subject: [PATCH 01/28] [NOT FOR REVIEW] drm: color pipeline base work config: x86_64-randconfig-161-20240213 (https://download.01.org/0day-ci/archive/20240218/202402180051.37wkwgmx-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202402180051.37wkwgmx-...@intel.com/ smatch warnings: drivers/gpu/drm/drm_atomic.c:825 drm_atomic_plane_print_state() warn: inconsistent indenting vim +825 drivers/gpu/drm/drm_atomic.c 799 800 static void drm_atomic_plane_print_state(struct drm_printer *p, 801 const struct drm_plane_state *state) 802 { 803 struct drm_plane *plane = state->plane; 804 struct drm_rect src = drm_plane_state_src(state); 805 struct drm_rect dest = drm_plane_state_dest(state); 806 807 drm_printf(p, "plane[%u]: %s\n", plane->base.id, plane->name); 808 drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)"); 809 drm_printf(p, "\tfb=%u\n", state->fb ? state->fb->base.id : 0); 810 if (state->fb) 811 drm_framebuffer_print_info(p, 2, state->fb); 812 drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG()); 813 drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG()); 814 drm_printf(p, "\trotation=%x\n", state->rotation); 815 drm_printf(p, "\tnormalized-zpos=%x\n", state->normalized_zpos); 816 drm_printf(p, "\tcolor-encoding=%s\n", 817 drm_get_color_encoding_name(state->color_encoding)); 818 drm_printf(p, "\tcolor-range=%s\n", 819 drm_get_color_range_name(state->color_range)); 820 drm_printf(p, "\tcolor_mgmt_changed=%d\n", state->color_mgmt_changed); 821 #if 0 822 drm_printf(p, "\tcolor-pipeline=%s\n", 823drm_get_color_pipeline_name(state->color_pipeline)); 824 #else > 825 drm_printf(p, "\tcolor-pipeline=%d\n", 826state->color_pipeline ? state->color_pipeline->base.id : 0); 827 #endif 828 829 830 if (plane->funcs->atomic_print_state) 831 plane->funcs->atomic_print_state(p, state); 832 } 833 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] drm/tests/drm_buddy: add alloc_contiguous test
On Wed, Feb 14, 2024 at 06:48:53PM +0530, Arunpravin Paneer Selvam wrote: > From: Matthew Auld > > Sanity check DRM_BUDDY_CONTIGUOUS_ALLOCATION. > > v2: Fix checkpatch warnings. > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3097 > Signed-off-by: Matthew Auld > Cc: Arunpravin Paneer Selvam > Cc: Limonciello > Cc: Christian König > Reviewed-by: Arunpravin Paneer Selvam > Signed-off-by: Arunpravin Paneer Selvam Building csky:allmodconfig ... failed Building openrisc:allmodconfig ... failed Building parisc:allmodconfig ... failed Building xtensa:allmodconfig ... failed [ and presumably all other 32-bit systems which enable this test ] -- Error log: ERROR: modpost: "__umoddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined! ERROR: modpost: "__moddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined! Guenter
Re: [PATCH v2 2/8] staging/fbtft: Include
On Tue, Feb 13, 2024 at 09:42:20AM +0100, Thomas Zimmermann wrote: > Resolved the proxy include via , which does not require the > backlight header. > > Signed-off-by: Thomas Zimmermann Acked-by: Greg Kroah-Hartman
Re: drm/msm: DisplayPort regressions in 6.8-rc1
On Tue, Feb 13, 2024 at 12:42:17PM +0100, Johan Hovold wrote: > Since 6.8-rc1 the internal eDP display on the Lenovo ThinkPad X13s does > not always show up on boot. > > The logs indicate problems with the runtime PM and eDP rework that went > into 6.8-rc1: > > [6.007872] [drm:drm_bridge_attach [drm]] *ERROR* failed to attach > bridge /soc@0/phy@88eb000 to encoder TMDS-31: -16 > and this can also manifest itself as a NULL-pointer dereference: > > [7.339447] Unable to handle kernel NULL pointer dereference at > virtual address > > [7.643705] pc : drm_bridge_attach+0x70/0x1a8 [drm] #regzbot ^introduced: 2bcca96abfbf It looks like it may have been possible to hit this also before commit 2bcca96abfbf ("soc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE") and the transparent bridge rework in 6.8-rc1 even if that has not yet been confirmed. The above is what made this trigger since 6.8-rc1 however. Johan
Re: drm/msm: DisplayPort regressions in 6.8-rc1
On Wed, Feb 14, 2024 at 02:52:06PM +0100, Johan Hovold wrote: > On Tue, Feb 13, 2024 at 10:00:13AM -0800, Abhinav Kumar wrote: > > > I do agree that pm runtime eDP driver got merged that time but I think > > the issue is either a combination of that along with DRM aux bridge > > https://patchwork.freedesktop.org/series/122584/ OR just the latter as > > even that went in around the same time. > > Yes, indeed there was a lot of changes that went into the MSM drm driver > in 6.8-rc1 and since I have not tried to debug this myself I can't say > for sure which change or changes that triggered this regression (or > possibly regressions). > > The fact that the USB-C/DP PHY appears to be involved > (/soc@0/phy@88eb000) could indeed point to the series you mentioned. > > > Thats why perhaps this issue was not seen with the chromebooks we tested > > on as they do not use pmic_glink (aux bridge). > > > > So we will need to debug this on sc8280xp specifically or an equivalent > > device which uses aux bridge. > > I've hit the NULL-pointer deference three times now in the last few days > on the sc8280xp CRD. But since it doesn't trigger on every boot it seems > you need to go back to the series that could potentially have caused > this regression and review them again. There's clearly something quite > broken here. Since Dmitry had trouble reproducing this issue I took a closer look at the DRM aux bridge series that Abhinav pointed and was able to track down the bridge regressions and come up with a reproducer. I just posted a series fixing this here: https://lore.kernel.org/lkml/20240217150228.5788-1-johan+lin...@kernel.org/ As I mentioned in the cover letter, I am still seeing intermittent hard resets around the time that the DRM subsystem is initialising, which suggests that we may be dealing with two separate DRM regressions here however. If the hard resets are triggered by something like unclocked hardware, perhaps that bit could this be related to the runtime PM rework? Johan
[PATCH] drm/vc4: drv: Avoid possible NPD when booted without KMS
From: Dom Cobley In case there is no matching KMS, the function vc4_match_add_driver won't change the match pointer which is initialized with NULL. Since component_master_add_with_match doesn't expected match to be a NULL pointer, this results into a NPD. Fixes: c8b75bca92cb ("drm/vc4: Add KMS support for Raspberry Pi.") Signed-off-by: Dom Cobley Signed-off-by: Stefan Wahren --- drivers/gpu/drm/vc4/vc4_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index c133e96b8aca..4f17840df9d3 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -439,6 +439,8 @@ static int vc4_platform_drm_probe(struct platform_device *pdev) vc4_match_add_drivers(dev, , component_drivers, ARRAY_SIZE(component_drivers)); + if (!match) + return -ENODEV; return component_master_add_with_match(dev, _drm_ops, match); } -- 2.34.1
[PATCH 2/6] drm/bridge: aux-hpd: separate allocation and registration
Combining allocation and registration is an anti-pattern that should be avoided. Add two new functions for allocating and registering an dp-hpd bridge with a proper 'devm' prefix so that it is clear that these are device managed interfaces. devm_drm_dp_hpd_bridge_alloc() devm_drm_dp_hpd_bridge_add() The new interface will be used to fix a use-after-free bug in the Qualcomm PMIC GLINK driver and may prevent similar issues from being introduced elsewhere. The existing drm_dp_hpd_bridge_register() is reimplemented using the above and left in place for now. Signed-off-by: Johan Hovold --- drivers/gpu/drm/bridge/aux-hpd-bridge.c | 67 +++-- include/drm/bridge/aux-bridge.h | 15 ++ 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/bridge/aux-hpd-bridge.c b/drivers/gpu/drm/bridge/aux-hpd-bridge.c index 9e71daf95bde..6886db2d9e00 100644 --- a/drivers/gpu/drm/bridge/aux-hpd-bridge.c +++ b/drivers/gpu/drm/bridge/aux-hpd-bridge.c @@ -30,16 +30,13 @@ static void drm_aux_hpd_bridge_release(struct device *dev) kfree(adev); } -static void drm_aux_hpd_bridge_unregister_adev(void *_adev) +static void drm_aux_hpd_bridge_free_adev(void *_adev) { - struct auxiliary_device *adev = _adev; - - auxiliary_device_delete(adev); - auxiliary_device_uninit(adev); + auxiliary_device_uninit(_adev); } /** - * drm_dp_hpd_bridge_register - Create a simple HPD DisplayPort bridge + * devm_drm_dp_hpd_bridge_alloc - allocate a HPD DisplayPort bridge * @parent: device instance providing this bridge * @np: device node pointer corresponding to this bridge instance * @@ -47,11 +44,9 @@ static void drm_aux_hpd_bridge_unregister_adev(void *_adev) * DRM_MODE_CONNECTOR_DisplayPort, which terminates the bridge chain and is * able to send the HPD events. * - * Return: device instance that will handle created bridge or an error code - * encoded into the pointer. + * Return: bridge auxiliary device pointer or an error pointer */ -struct device *drm_dp_hpd_bridge_register(struct device *parent, - struct device_node *np) +struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent, struct device_node *np) { struct auxiliary_device *adev; int ret; @@ -82,13 +77,55 @@ struct device *drm_dp_hpd_bridge_register(struct device *parent, return ERR_PTR(ret); } - ret = auxiliary_device_add(adev); - if (ret) { - auxiliary_device_uninit(adev); + ret = devm_add_action_or_reset(parent, drm_aux_hpd_bridge_free_adev, adev); + if (ret) return ERR_PTR(ret); - } - ret = devm_add_action_or_reset(parent, drm_aux_hpd_bridge_unregister_adev, adev); + return adev; +} +EXPORT_SYMBOL_GPL(devm_drm_dp_hpd_bridge_alloc); + +static void drm_aux_hpd_bridge_del_adev(void *_adev) +{ + auxiliary_device_delete(_adev); +} + +/** + * devm_drm_dp_hpd_bridge_add - register a HDP DisplayPort bridge + * @dev: struct device to tie registration lifetime to + * @adev: bridge auxiliary device to be registered + * + * Returns: zero on success or a negative errno + */ +int devm_drm_dp_hpd_bridge_add(struct device *dev, struct auxiliary_device *adev) +{ + int ret; + + ret = auxiliary_device_add(adev); + if (ret) + return ret; + + return devm_add_action_or_reset(dev, drm_aux_hpd_bridge_del_adev, adev); +} +EXPORT_SYMBOL_GPL(devm_drm_dp_hpd_bridge_add); + +/** + * drm_dp_hpd_bridge_register - allocate and register a HDP DisplayPort bridge + * @parent: device instance providing this bridge + * @np: device node pointer corresponding to this bridge instance + * + * Return: device instance that will handle created bridge or an error pointer + */ +struct device *drm_dp_hpd_bridge_register(struct device *parent, struct device_node *np) +{ + struct auxiliary_device *adev; + int ret; + + adev = devm_drm_dp_hpd_bridge_alloc(parent, np); + if (IS_ERR(adev)) + return ERR_CAST(adev); + + ret = devm_drm_dp_hpd_bridge_add(parent, adev); if (ret) return ERR_PTR(ret); diff --git a/include/drm/bridge/aux-bridge.h b/include/drm/bridge/aux-bridge.h index c4c423e97f06..4453906105ca 100644 --- a/include/drm/bridge/aux-bridge.h +++ b/include/drm/bridge/aux-bridge.h @@ -9,6 +9,8 @@ #include +struct auxiliary_device; + #if IS_ENABLED(CONFIG_DRM_AUX_BRIDGE) int drm_aux_bridge_register(struct device *parent); #else @@ -19,10 +21,23 @@ static inline int drm_aux_bridge_register(struct device *parent) #endif #if IS_ENABLED(CONFIG_DRM_AUX_HPD_BRIDGE) +struct auxiliary_device *devm_drm_dp_hpd_bridge_alloc(struct device *parent, struct device_node *np); +int devm_drm_dp_hpd_bridge_add(struct device *dev, struct auxiliary_device *adev); struct device *drm_dp_hpd_bridge_register(struct device
[PATCH 0/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free
Starting with 6.8-rc1 the internal display sometimes fails to come up on machines like the Lenovo ThinkPad X13s and the logs indicate that this is due to a regression in the DRM subsystem [1]. This series fixes a race in the pmic_glink_altmode driver which was exposed / triggered by the transparent DRM bridges rework that went into 6.8-rc1 and that manifested itself as a bridge failing to attach and sometimes triggering a NULL-pointer dereference. The intermittent hard resets that have also been reported since 6.8-rc1 unfortunately still remains and suggests that we are dealing with two separate regressions. There is some indication that also the hard resets (e.g. due to register accesses to unclocked hardware) are also due to changes in the DRM subsystem as it happens around the time that the eDP panel and display controller would be initialised during boot (the runtime PM rework?). This remains to be verified, however. Included is also a fix for a related OF node reference leak in the aux-hpd driver found through inspection when reworking the driver. The use-after-free bug is triggered by a probe deferral and highlighted some further bugs in the involved drivers, which were registering child devices before deferring probe. This behaviour is not correct and can both trigger probe deferral loops and potentially also further issues with the DRM bridge implementation. This series can either go through the Qualcomm SoC tree (pmic_glink) or the DRM tree. The PHY patches do not depend on the rest of the series and could possibly be merged separately through the PHY tree. Whichever gets this to mainline the fastest. Johan [1] https://lore.kernel.org/lkml/zctvmlk4ztwcp...@hovoldconsulting.com/ Johan Hovold (5): drm/bridge: aux-hpd: fix OF node leaks drm/bridge: aux-hpd: separate allocation and registration soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free phy: qcom-qmp-combo: fix drm bridge registration phy: qcom-qmp-combo: fix type-c switch registration Rob Clark (1): soc: qcom: pmic_glink: Fix boot when QRTR=m drivers/gpu/drm/bridge/aux-hpd-bridge.c | 70 ++- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 +++--- drivers/soc/qcom/pmic_glink.c | 21 +++ drivers/soc/qcom/pmic_glink_altmode.c | 16 +- include/drm/bridge/aux-bridge.h | 15 + 5 files changed, 102 insertions(+), 36 deletions(-) -- 2.43.0
[PATCH 5/6] phy: qcom-qmp-combo: fix drm bridge registration
Due to a long-standing issue in driver core, drivers may not probe defer after having registered child devices to avoid triggering a probe deferral loop (see fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). This could potentially also trigger a bug in the DRM bridge implementation which does not expect bridges to go away even if device links may avoid triggering this (when enabled). Move registration of the DRM aux bridge to after looking up clocks and other resources. Note that PHY creation can in theory also trigger a probe deferral when a 'phy' supply is used. This does not seem to affect the QMP PHY driver but the PHY subsystem should be reworked to address this (i.e. by separating initialisation and registration of the PHY). Fixes: 35921910bbd0 ("phy: qcom: qmp-combo: switch to DRM_AUX_BRIDGE") Fixes: 1904c3f578dc ("phy: qcom-qmp-combo: Introduce drm_bridge") Cc: sta...@vger.kernel.org # 6.5 Cc: Bjorn Andersson Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 1ad10110dd25..e19d6a084f10 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -3566,10 +3566,6 @@ static int qmp_combo_probe(struct platform_device *pdev) if (ret) return ret; - ret = drm_aux_bridge_register(dev); - if (ret) - return ret; - /* Check for legacy binding with child nodes. */ usb_np = of_get_child_by_name(dev->of_node, "usb3-phy"); if (usb_np) { @@ -3589,6 +3585,10 @@ static int qmp_combo_probe(struct platform_device *pdev) if (ret) goto err_node_put; + ret = drm_aux_bridge_register(dev); + if (ret) + goto err_node_put; + pm_runtime_set_active(dev); ret = devm_pm_runtime_enable(dev); if (ret) -- 2.43.0
[PATCH 4/6] soc: qcom: pmic_glink: Fix boot when QRTR=m
From: Rob Clark We need to bail out before adding/removing devices if we are going to -EPROBE_DEFER. Otherwise boot can get stuck in a probe deferral loop due to a long-standing issue in driver core (see fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). Deregistering the altmode child device can potentially also trigger bugs in the DRM bridge implementation, which does not expect bridges to go away. Suggested-by: Dmitry Baryshkov Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20231213210644.8702-1-robdcl...@gmail.com [ johan: rebase on 6.8-rc4, amend commit message and mention DRM ] Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Cc: sta...@vger.kernel.org # 6.3 Cc: Bjorn Andersson Signed-off-by: Johan Hovold --- drivers/soc/qcom/pmic_glink.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c index f4bfd24386f1..f913e9bd57ed 100644 --- a/drivers/soc/qcom/pmic_glink.c +++ b/drivers/soc/qcom/pmic_glink.c @@ -265,10 +265,17 @@ static int pmic_glink_probe(struct platform_device *pdev) pg->client_mask = *match_data; + pg->pdr = pdr_handle_alloc(pmic_glink_pdr_callback, pg); + if (IS_ERR(pg->pdr)) { + ret = dev_err_probe(>dev, PTR_ERR(pg->pdr), + "failed to initialize pdr\n"); + return ret; + } + if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_UCSI)) { ret = pmic_glink_add_aux_device(pg, >ucsi_aux, "ucsi"); if (ret) - return ret; + goto out_release_pdr_handle; } if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_ALTMODE)) { ret = pmic_glink_add_aux_device(pg, >altmode_aux, "altmode"); @@ -281,17 +288,11 @@ static int pmic_glink_probe(struct platform_device *pdev) goto out_release_altmode_aux; } - pg->pdr = pdr_handle_alloc(pmic_glink_pdr_callback, pg); - if (IS_ERR(pg->pdr)) { - ret = dev_err_probe(>dev, PTR_ERR(pg->pdr), "failed to initialize pdr\n"); - goto out_release_aux_devices; - } - service = pdr_add_lookup(pg->pdr, "tms/servreg", "msm/adsp/charger_pd"); if (IS_ERR(service)) { ret = dev_err_probe(>dev, PTR_ERR(service), "failed adding pdr lookup for charger_pd\n"); - goto out_release_pdr_handle; + goto out_release_aux_devices; } mutex_lock(&__pmic_glink_lock); @@ -300,8 +301,6 @@ static int pmic_glink_probe(struct platform_device *pdev) return 0; -out_release_pdr_handle: - pdr_handle_release(pg->pdr); out_release_aux_devices: if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_BATT)) pmic_glink_del_aux_device(pg, >ps_aux); @@ -311,6 +310,8 @@ static int pmic_glink_probe(struct platform_device *pdev) out_release_ucsi_aux: if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_UCSI)) pmic_glink_del_aux_device(pg, >ucsi_aux); +out_release_pdr_handle: + pdr_handle_release(pg->pdr); return ret; } -- 2.43.0
[PATCH 3/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free
A recent DRM series purporting to simplify support for "transparent bridges" and handling of probe deferrals ironically exposed a use-after-free issue on pmic_glink_altmode probe deferral. This has manifested itself as the display subsystem occasionally failing to initialise and NULL-pointer dereferences during boot of machines like the Lenovo ThinkPad X13s. Specifically, the dp-hpd bridge is currently registered before all resources have been acquired which means that it can also be deregistered on probe deferrals. In the meantime there is a race window where the new aux bridge driver (or PHY driver previously) may have looked up the dp-hpd bridge and stored a (non-reference-counted) pointer to the bridge which is about to be deallocated. When the display controller is later initialised, this triggers a use-after-free when attaching the bridges: dp -> aux -> dp-hpd (freed) which may, for example, result in the freed bridge failing to attach: [drm:drm_bridge_attach [drm]] *ERROR* failed to attach bridge /soc@0/phy@88eb000 to encoder TMDS-31: -16 or a NULL-pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address ... Call trace: drm_bridge_attach+0x70/0x1a8 [drm] drm_aux_bridge_attach+0x24/0x38 [aux_bridge] drm_bridge_attach+0x80/0x1a8 [drm] dp_bridge_init+0xa8/0x15c [msm] msm_dp_modeset_init+0x28/0xc4 [msm] The DRM bridge implementation is clearly fragile and implicitly built on the assumption that bridges may never go away. In this case, the fix is to move the bridge registration in the pmic_glink_altmode driver to after all resources have been looked up. Incidentally, with the new dp-hpd bridge implementation, which registers child devices, this is also a requirement due to a long-standing issue in driver core that can otherwise lead to a probe deferral loop (see fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). Fixes: 080b4e24852b ("soc: qcom: pmic_glink: Introduce altmode support") Fixes: 2bcca96abfbf ("soc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE") Cc: sta...@vger.kernel.org # 6.3 Cc: Bjorn Andersson Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/soc/qcom/pmic_glink_altmode.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c index 5fcd0fdd2faa..b3808fc24c69 100644 --- a/drivers/soc/qcom/pmic_glink_altmode.c +++ b/drivers/soc/qcom/pmic_glink_altmode.c @@ -76,7 +76,7 @@ struct pmic_glink_altmode_port { struct work_struct work; - struct device *bridge; + struct auxiliary_device *bridge; enum typec_orientation orientation; u16 svid; @@ -230,7 +230,7 @@ static void pmic_glink_altmode_worker(struct work_struct *work) else pmic_glink_altmode_enable_usb(altmode, alt_port); - drm_aux_hpd_bridge_notify(alt_port->bridge, + drm_aux_hpd_bridge_notify(_port->bridge->dev, alt_port->hpd_state ? connector_status_connected : connector_status_disconnected); @@ -454,7 +454,7 @@ static int pmic_glink_altmode_probe(struct auxiliary_device *adev, alt_port->index = port; INIT_WORK(_port->work, pmic_glink_altmode_worker); - alt_port->bridge = drm_dp_hpd_bridge_register(dev, to_of_node(fwnode)); + alt_port->bridge = devm_drm_dp_hpd_bridge_alloc(dev, to_of_node(fwnode)); if (IS_ERR(alt_port->bridge)) { fwnode_handle_put(fwnode); return PTR_ERR(alt_port->bridge); @@ -510,6 +510,16 @@ static int pmic_glink_altmode_probe(struct auxiliary_device *adev, } } + for (port = 0; port < ARRAY_SIZE(altmode->ports); port++) { + alt_port = >ports[port]; + if (!alt_port->bridge) + continue; + + ret = devm_drm_dp_hpd_bridge_add(dev, alt_port->bridge); + if (ret) + return ret; + } + altmode->client = devm_pmic_glink_register_client(dev, altmode->owner_id, pmic_glink_altmode_callback, -- 2.43.0
[PATCH 1/6] drm/bridge: aux-hpd: fix OF node leaks
The two device node references taken during allocation need to be dropped when the auxiliary device is freed. Fixes: 6914968a0b52 ("drm/bridge: properly refcount DT nodes in aux bridge drivers") Cc: Dmitry Baryshkov Cc: Neil Armstrong Signed-off-by: Johan Hovold --- drivers/gpu/drm/bridge/aux-hpd-bridge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/bridge/aux-hpd-bridge.c b/drivers/gpu/drm/bridge/aux-hpd-bridge.c index bb55f697a181..9e71daf95bde 100644 --- a/drivers/gpu/drm/bridge/aux-hpd-bridge.c +++ b/drivers/gpu/drm/bridge/aux-hpd-bridge.c @@ -25,6 +25,7 @@ static void drm_aux_hpd_bridge_release(struct device *dev) ida_free(_aux_hpd_bridge_ida, adev->id); of_node_put(adev->dev.platform_data); + of_node_put(adev->dev.of_node); kfree(adev); } @@ -74,6 +75,8 @@ struct device *drm_dp_hpd_bridge_register(struct device *parent, ret = auxiliary_device_init(adev); if (ret) { + of_node_put(adev->dev.platform_data); + of_node_put(adev->dev.of_node); ida_free(_aux_hpd_bridge_ida, adev->id); kfree(adev); return ERR_PTR(ret); -- 2.43.0
[PATCH 6/6] phy: qcom-qmp-combo: fix type-c switch registration
Due to a long-standing issue in driver core, drivers may not probe defer after having registered child devices to avoid triggering a probe deferral loop (see fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). Move registration of the typec switch to after looking up clocks and other resources. Note that PHY creation can in theory also trigger a probe deferral when a 'phy' supply is used. This does not seem to affect the QMP PHY driver but the PHY subsystem should be reworked to address this (i.e. by separating initialisation and registration of the PHY). Fixes: 2851117f8f42 ("phy: qcom-qmp-combo: Introduce orientation switching") Cc: sta...@vger.kernel.org # 6.5 Cc: Bjorn Andersson Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index e19d6a084f10..17c4ad7553a5 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -3562,10 +3562,6 @@ static int qmp_combo_probe(struct platform_device *pdev) if (ret) return ret; - ret = qmp_combo_typec_switch_register(qmp); - if (ret) - return ret; - /* Check for legacy binding with child nodes. */ usb_np = of_get_child_by_name(dev->of_node, "usb3-phy"); if (usb_np) { @@ -3585,6 +3581,10 @@ static int qmp_combo_probe(struct platform_device *pdev) if (ret) goto err_node_put; + ret = qmp_combo_typec_switch_register(qmp); + if (ret) + goto err_node_put; + ret = drm_aux_bridge_register(dev); if (ret) goto err_node_put; -- 2.43.0
Re: [PATCH 17/27] sparc32: Drop run-time patching of ASI instructions
Hi Andreas, > > diff --git a/arch/sparc/include/asm/winmacro.h > > b/arch/sparc/include/asm/winmacro.h > > index b6e911f5d93c..c496b04cdfaf 100644 > > --- a/arch/sparc/include/asm/winmacro.h > > +++ b/arch/sparc/include/asm/winmacro.h > > @@ -108,18 +108,11 @@ > > 661: rd %tbr, %idreg; \ > > srl %idreg, 10, %idreg; \ > > and %idreg, 0xc, %idreg;\ > > These three lines, including the label, should also be removed as they > are not for LEON. Additionally, I think it would be best to split out > removing the cpuid instruction fixups to one patch and the MMU ASI > instruction fixups to another patch. Nice catch! I will fix this and split up in two patches in v2. It will take some days before I have v2 ready, and I will base it on top of your for-next branch in the sparc.git tree. Sam > > > - .section.cpuid_patch, "ax"; \ > > - /* Instruction location. */ \ > > - .word 661b; \ > > - /* SUN4D implementation. */ \ > > - lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ > > - sll %idreg, 2, %idreg; \ > > - nop;\ > > - /* LEON implementation. */ \ > > + \ > > rd %asr17, %idreg; \ > > srl %idreg, 0x1c, %idreg; \ > > sll %idreg, 0x02, %idreg; \ > > - .previous; \ > > + \ > > sethi%hi(current_set), %dest_reg; \ > > or %dest_reg, %lo(current_set), %dest_reg;\ > > ld [%idreg + %dest_reg], %dest_reg; > > diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S > > index 0f2417ee3f95..9cf8f87e8c42 100644 > > --- a/arch/sparc/kernel/entry.S > > +++ b/arch/sparc/kernel/entry.S > > The hard_smp_processor_id function also needs to be reduced to just the > LEON code. With the patching removed, SMP otherwise breaks with CPUs > other than CPU 0 getting stuck. > > Thanks, > Andreas
Re: [PATCH v3 2/4] dt-bindings: display/msm: Document MDSS on X1E80100
On 24-02-16 12:32:02, Rob Herring wrote: > > On Fri, 16 Feb 2024 19:01:06 +0200, Abel Vesa wrote: > > Document the MDSS hardware found on the Qualcomm X1E80100 platform. > > > > Reviewed-by: Krzysztof Kozlowski > > Signed-off-by: Abel Vesa > > --- > > .../bindings/display/msm/qcom,x1e80100-mdss.yaml | 253 > > + > > 1 file changed, 253 insertions(+) > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.example.dts:24:18: > fatal error: dt-bindings/clock/qcom,x1e80100-dispcc.h: No such file or > directory >24 | #include > | ^~ > compilation terminated. > make[2]: *** [scripts/Makefile.lib:419: > Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.example.dtb] > Error 1 > make[2]: *** Waiting for unfinished jobs > make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1428: > dt_binding_check] Error 2 > make: *** [Makefile:240: __sub-make] Error 2 > These bindings headers are already in -next. > doc reference errors (make refcheckdocs): > > See > https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240216-x1e80100-display-v3-2-28b1c33ac...@linaro.org > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. >
[PATCH v2 0/4] Add display support for stm32mp135f-dk board
This serie aims to enable display support for the stm32mp135f-dk board Those are only patches of the device-tree since the driver support has already been added [1]. It respectivelly: - adds support for the display controller on stm32mp135 - adds pinctrl for the display controller - enables panel, backlight and display controller on stm32mp135f-dk Finally it fixes the flags on the panel default mode in the 'panel-simple' driver, allowing to override the default mode by one described in the device tree, and push further the blanking limit on the panel. [1] commit 1726cee3d053 ("drm/stm: ltdc: support of new hardware version") Changes in v2: - Removed already merged patches https://lore.kernel.org/lkml/17072972.1647630.4818786052103823648.b4...@linaro.org/ https://lore.kernel.org/lkml/170729755662.1647630.425379349649657352.b4...@linaro.org/ - Fixed CHECK_DTBS warnings - Added missing properties in panel-simple.yaml Signed-off-by: Raphael Gallais-Pou --- Raphael Gallais-Pou (4): ARM: dts: stm32: add LTDC support for STM32MP13x SoC family ARM: dts: stm32: add LTDC pinctrl on STM32MP13x SoC family ARM: dts: stm32: enable display support on stm32mp135f-dk board dt-bindings: display: simple: hardware can use several properties .../bindings/display/panel/panel-simple.yaml | 3 ++ arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi| 57 ++ arch/arm/boot/dts/st/stm32mp135.dtsi | 11 + arch/arm/boot/dts/st/stm32mp135f-dk.dts| 53 4 files changed, 124 insertions(+) --- base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d change-id: 20240124-ltdc_mp13-2f86a782424c Best regards, -- Raphael Gallais-Pou
[PATCH v2 3/4] ARM: dts: stm32: enable display support on stm32mp135f-dk board
Link panel and display controller. Enable panel, backlight and display controller. Signed-off-by: Raphael Gallais-Pou --- Changes in v2: - Fixed dtbs_check warnings : arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-backlight: 'default-brightness-level' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/leds/backlight/gpio-backlight.yaml# arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: data-mapping:0: 'bgr666' is not one of ['jeida-18', 'jeida-24', 'vesa-24'] from schema $id: http://devicetree.org/schemas/display/panel/panel-simple.yaml# arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: compatible: ['rocktech,rk043fn48h', 'panel-dpi'] is too long from schema $id: http://devicetree.org/schemas/display/panel/panel-simple.yaml# arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: data-mapping: False schema does not allow ['bgr666'] from schema $id: http://devicetree.org/schemas/display/panel/panel-simple.yaml# --- arch/arm/boot/dts/st/stm32mp135f-dk.dts | 53 + 1 file changed, 53 insertions(+) diff --git a/arch/arm/boot/dts/st/stm32mp135f-dk.dts b/arch/arm/boot/dts/st/stm32mp135f-dk.dts index eea740d097c7..c918f332cbfd 100644 --- a/arch/arm/boot/dts/st/stm32mp135f-dk.dts +++ b/arch/arm/boot/dts/st/stm32mp135f-dk.dts @@ -66,6 +66,46 @@ led-blue { default-state = "off"; }; }; + + panel_backlight: panel-backlight { + compatible = "gpio-backlight"; + gpios = < 12 GPIO_ACTIVE_HIGH>; + default-on; + status = "okay"; + }; + + panel_rgb: panel-rgb { + compatible = "rocktech,rk043fn48h"; + enable-gpios = < 7 GPIO_ACTIVE_HIGH>; + backlight = <_backlight>; + power-supply = <_v3v3_sw>; + status = "okay"; + + width-mm = <105>; + height-mm = <67>; + + panel-timing { + clock-frequency = <1000>; + hactive = <480>; + hback-porch = <43>; + hfront-porch = <10>; + hsync-len = <1>; + hsync-active = <0>; + vactive = <272>; + vback-porch = <26>; + vfront-porch = <4>; + vsync-len = <10>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + + port { + panel_in_rgb: endpoint { + remote-endpoint = <_out_rgb>; + }; + }; + }; }; _1 { @@ -160,6 +200,19 @@ { status = "okay"; }; + { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <_pins_a>; + pinctrl-1 = <_sleep_pins_a>; + status = "okay"; + + port { + ltdc_out_rgb: endpoint { + remote-endpoint = <_in_rgb>; + }; + }; +}; + { status = "okay"; }; -- 2.25.1
[PATCH v2 2/4] ARM: dts: stm32: add LTDC pinctrl on STM32MP13x SoC family
Adds LTDC pinctrl support and assigns dedicated GPIO pins. Signed-off-by: Raphael Gallais-Pou --- arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi | 57 + 1 file changed, 57 insertions(+) diff --git a/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi b/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi index 27e0c3826789..32c5d8a1e06a 100644 --- a/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi +++ b/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi @@ -47,6 +47,63 @@ pins { }; }; + ltdc_pins_a: ltdc-0 { + pins { + pinmux = , /* LCD_CLK */ +, /* LCD_HSYNC */ +, /* LCD_VSYNC */ +, /* LCD_DE */ +, /* LCD_R2 */ +, /* LCD_R3 */ +, /* LCD_R4 */ +, /* LCD_R5 */ +, /* LCD_R6 */ +, /* LCD_R7 */ +, /* LCD_G2 */ +, /* LCD_G3 */ +, /* LCD_G4 */ +, /* LCD_G5 */ +, /* LCD_G6 */ +, /* LCD_G7 */ +, /* LCD_B2 */ +, /* LCD_B3 */ +, /* LCD_B4 */ +, /* LCD_B5 */ +, /* LCD_B6 */ +; /* LCD_B7 */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + }; + + ltdc_sleep_pins_a: ltdc-sleep-0 { + pins { + pinmux = , /* LCD_CLK */ +, /* LCD_HSYNC */ +, /* LCD_VSYNC */ +, /* LCD_DE */ +, /* LCD_R2 */ +, /* LCD_R3 */ +, /* LCD_R4 */ +, /* LCD_R5 */ +, /* LCD_R6 */ +, /* LCD_R7 */ +, /* LCD_G2 */ +, /* LCD_G3 */ +, /* LCD_G4 */ +, /* LCD_G5 */ +, /* LCD_G6 */ +, /* LCD_G7 */ +, /* LCD_B2 */ +, /* LCD_B3 */ +, /* LCD_B4 */ +, /* LCD_B5 */ +, /* LCD_B6 */ +; /* LCD_B7 */ + }; + }; + mcp23017_pins_a: mcp23017-0 { pins { pinmux = ; -- 2.25.1
[PATCH v2 1/4] ARM: dts: stm32: add LTDC support for STM32MP13x SoC family
STM32MP13x SoC family embeds a new version of LTDC (Liquid crystal display - Thin film transistor) Display Controller. It provides a parallel digital RGB (red, green, blue) and signals for horizontal, vertical synchronization, pixel clock and data enable as output to interface directly to a variety of LCD-TFT panels. Main features * 2 input layers blended together to compose the display * Cropping of layers from any input size and location * Multiple input pixel formats: – Predefined ARGB, with 7 formats: ARGB, ABGR, RGBA, BGRA, RGB565, BGR565, RGB888packed. – Flexible ARGB, allowing any width and location for A,R,G,B components. – Predefined YUV, with 3 formats: YUV422-1L (FourCC: YUYV, Interleaved), YUV420-2L (FourCC: NV12, semi planar), YUV420-3L (FourCC: Yxx, full planar) with some flexibility on the sequence of the component. * Color look-up table (CLUT) up to 256 colors (256x24 bits) per layer * Color transparency keying * Composition with flexible window position and size versus output display * Blending with flexible layer order and alpha value (per pixel or constant) * Background underlying color * Gamma with non-linear configurable table * Dithering for output with less bits per component (pseudo-random on 2 bits) * Polarity inversion for HSync, VSync, and DataEnable outputs * Output as RGB888 24 bpp or YUV422 16 bpp * Secure layer (using Layer2) capability, with grouped regs and additional interrupt set * Interrupts based on 7 different events * AXI master interface with long efficient bursts (64 or 128 bytes) Signed-off-by: Raphael Gallais-Pou Signed-off-by: Yannick Fertre --- arch/arm/boot/dts/st/stm32mp135.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/st/stm32mp135.dtsi b/arch/arm/boot/dts/st/stm32mp135.dtsi index 68d32f9f5314..834a4d545fe4 100644 --- a/arch/arm/boot/dts/st/stm32mp135.dtsi +++ b/arch/arm/boot/dts/st/stm32mp135.dtsi @@ -19,5 +19,16 @@ dcmipp: dcmipp@5a00 { port { }; }; + + ltdc: display-controller@5a001000 { + compatible = "st,stm32-ltdc"; + reg = <0x5a001000 0x400>; + interrupts = , +; + clocks = < LTDC_PX>; + clock-names = "lcd"; + resets = <_reset RST_SCMI_LTDC>; + status = "disabled"; + }; }; }; -- 2.25.1
[PATCH v2 4/4] dt-bindings: display: simple: hardware can use several properties
Setting a panel-timing in the device-tree overwrite the one specified in the driver and set it as preferred. In that case 'height-mm', 'width-mm' and 'panel-timing' are properties that can be use for simple panels, according to panel-common.yaml Fixes following warnings: arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: 'height-mm', 'panel-timing', 'width-mm' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/display/panel/panel-simple.yaml# Signed-off-by: Raphael Gallais-Pou --- Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml index 634a10c6f2dd..c02cbbc7a100 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml @@ -352,6 +352,9 @@ properties: no-hpd: true hpd-gpios: true data-mapping: true + height-mm: true + width-mm: true + panel-timing: true if: not: -- 2.25.1
Re: [PATCH v6 1/5] drm: Stop using `select ACPI_VIDEO` in all drivers
Hi Mario, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.8-rc4 next-20240216] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/drm-Stop-using-select-ACPI_VIDEO-in-all-drivers/20240215-055936 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20240214215756.6530-2-mario.limonciello%40amd.com patch subject: [PATCH v6 1/5] drm: Stop using `select ACPI_VIDEO` in all drivers config: alpha-kismet-CONFIG_FB_BACKLIGHT-CONFIG_HT16K33-0-0 (https://download.01.org/0day-ci/archive/20240217/202402171727.maolcpxi-...@intel.com/config) reproduce: (https://download.01.org/0day-ci/archive/20240217/202402171727.maolcpxi-...@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202402171727.maolcpxi-...@intel.com/ kismet warnings: (new ones prefixed by >>) >> kismet: WARNING: unmet direct dependencies detected for FB_BACKLIGHT when >> selected by HT16K33 .config:210:warning: symbol value 'n' invalid for INPUT_MOUSEDEV_SCREEN_Y .config:243:warning: symbol value 'n' invalid for SATA_MOBILE_LPM_POLICY .config:338:warning: symbol value 'n' invalid for PSTORE_BLK_MAX_REASON .config:435:warning: symbol value 'n' invalid for KFENCE_SAMPLE_INTERVAL .config:437:warning: symbol value 'n' invalid for AIC79XX_DEBUG_MASK .config:521:warning: symbol value 'n' invalid for USB_GADGET_STORAGE_NUM_BUFFERS .config:618:warning: symbol value 'n' invalid for DRM_XE_JOB_TIMEOUT_MIN .config:632:warning: symbol value 'n' invalid for CRYPTO_DEV_QCE_SW_MAX_LEN .config:739:warning: symbol value 'n' invalid for PANEL_LCD_CHARSET .config:759:warning: symbol value 'n' invalid for SERIAL_ALTERA_UART_BAUDRATE .config:771:warning: symbol value 'n' invalid for SCSI_MESH_RESET_DELAY_MS .config:796:warning: symbol value 'n' invalid for SND_AC97_POWER_SAVE_DEFAULT .config:834:warning: symbol value 'n' invalid for MAGIC_SYSRQ_DEFAULT_ENABLE .config:851:warning: symbol value 'n' invalid for DRM_I915_MAX_REQUEST_BUSYWAIT .config:890:warning: symbol value 'n' invalid for SND_AT73C213_TARGET_BITRATE .config:892:warning: symbol value 'n' invalid for AIC79XX_CMDS_PER_DEVICE .config:907:warning: symbol value 'n' invalid for DRM_XE_PREEMPT_TIMEOUT_MIN .config:913:warning: symbol value 'n' invalid for NET_EMATCH_STACK .config:915:warning: symbol value 'n' invalid for VMCP_CMA_SIZE .config:973:warning: symbol value 'n' invalid for PANEL_LCD_PIN_SDA .config:1006:warning: symbol value 'n' invalid for PANEL_LCD_PIN_E .config:1142:warning: symbol value 'n' invalid for RCU_CPU_STALL_TIMEOUT .config:1170:warning: symbol value 'n' invalid for MTDRAM_ERASE_SIZE .config:1431:warning: symbol value 'n' invalid for LEGACY_PTY_COUNT .config:1581:warning: symbol value 'n' invalid for WATCHDOG_OPEN_TIMEOUT .config:1588:warning: symbol value 'n' invalid for AIC7XXX_RESET_DELAY_MS .config:1752:warning: symbol value 'n' invalid for IBM_EMAC_POLL_WEIGHT .config:1867:warning: symbol value 'n' invalid for DRM_I915_STOP_TIMEOUT .config:2098:warning: symbol value 'n' invalid for AIC79XX_RESET_DELAY_MS .config:2129:warning: symbol value 'n' invalid for SND_HDA_PREALLOC_SIZE .config:2176:warning: symbol value 'n' invalid for RCU_FANOUT_LEAF .config:2186:warning: symbol value 'n' invalid for KCOV_IRQ_AREA_SIZE .config:2307:warning: symbol value 'n' invalid for DRM_XE_TIMESLICE_MAX .config:2321:warning: symbol value 'n' invalid for PANEL_LCD_BWIDTH .config:2386:warning: symbol value 'n' invalid for XEN_MEMORY_HOTPLUG_LIMIT .config:2439:warning: symbol value 'n' invalid for VERBOSE_MCHECK_ON .config:2559:warning: symbol value 'n' invalid for PANEL_PARPORT .config:2645:warning: symbol value 'n' invalid for NOUVEAU_DEBUG_DEFAULT .config:2744:warning: symbol value 'n' invalid for MTD_REDBOOT_DIRECTORY_BLOCK .config:2803:warning: symbol value 'n' invalid for SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM .config:2831:warning: symbol value 'n' invalid for KCSAN_REPORT_ONCE_IN_MS .config:2928:warning: symbol value 'n' invalid for KCSAN_UDELAY_INTERRUPT .config:2952:warning: symbol value 'n' invalid for PANEL_LCD_PIN_BL .config:2969:warning: symbol value 'n' invalid for DEBUG_OBJECTS_ENABLE_DEFAULT .config:2977:warning: symbol value 'n' invalid for INITRAMFS_ROOT_GID .config:3081:warning: symbol value 'n' invalid for ATM_FORE200E_TX_RET
[PATCH] phy: constify of_phandle_args in xlate
The xlate callbacks are supposed to translate of_phandle_args to proper provider without modifying the of_phandle_args. Make the argument pointer to const for code safety and readability. Signed-off-by: Krzysztof Kozlowski --- drivers/phy/allwinner/phy-sun4i-usb.c | 2 +- drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +- drivers/phy/broadcom/phy-bcm-sr-pcie.c | 2 +- drivers/phy/broadcom/phy-bcm-sr-usb.c | 2 +- drivers/phy/broadcom/phy-bcm63xx-usbh.c| 2 +- drivers/phy/broadcom/phy-brcm-usb.c| 2 +- drivers/phy/freescale/phy-fsl-imx8qm-lvds-phy.c| 2 +- drivers/phy/freescale/phy-fsl-lynx-28g.c | 2 +- drivers/phy/hisilicon/phy-histb-combphy.c | 2 +- drivers/phy/intel/phy-intel-lgm-combo.c| 2 +- drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c| 2 +- drivers/phy/marvell/phy-armada375-usb2.c | 2 +- drivers/phy/marvell/phy-armada38x-comphy.c | 2 +- drivers/phy/marvell/phy-berlin-sata.c | 2 +- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 2 +- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 2 +- drivers/phy/mediatek/phy-mtk-mipi-csi-0-5.c| 2 +- drivers/phy/mediatek/phy-mtk-tphy.c| 2 +- drivers/phy/mediatek/phy-mtk-xsphy.c | 2 +- drivers/phy/microchip/lan966x_serdes.c | 2 +- drivers/phy/microchip/sparx5_serdes.c | 2 +- drivers/phy/mscc/phy-ocelot-serdes.c | 2 +- drivers/phy/phy-core.c | 8 drivers/phy/phy-xgene.c| 2 +- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- drivers/phy/ralink/phy-mt7621-pci.c| 2 +- drivers/phy/renesas/phy-rcar-gen2.c| 2 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +- drivers/phy/renesas/r8a779f0-ether-serdes.c| 2 +- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 2 +- drivers/phy/rockchip/phy-rockchip-pcie.c | 2 +- drivers/phy/samsung/phy-exynos-mipi-video.c| 2 +- drivers/phy/samsung/phy-exynos5-usbdrd.c | 2 +- drivers/phy/samsung/phy-samsung-usb2.c | 2 +- drivers/phy/socionext/phy-uniphier-usb2.c | 2 +- drivers/phy/st/phy-miphy28lp.c | 2 +- drivers/phy/st/phy-spear1310-miphy.c | 2 +- drivers/phy/st/phy-spear1340-miphy.c | 2 +- drivers/phy/st/phy-stm32-usbphyc.c | 2 +- drivers/phy/tegra/xusb.c | 2 +- drivers/phy/ti/phy-am654-serdes.c | 2 +- drivers/phy/ti/phy-da8xx-usb.c | 2 +- drivers/phy/ti/phy-gmii-sel.c | 2 +- drivers/phy/xilinx/phy-zynqmp.c| 2 +- drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 2 +- include/linux/phy/phy.h| 14 +++--- 46 files changed, 55 insertions(+), 55 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index e53a9a9317bc..b0f19e950601 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -683,7 +683,7 @@ static int sun4i_usb_phy0_vbus_notify(struct notifier_block *nb, } static struct phy *sun4i_usb_phy_xlate(struct device *dev, - struct of_phandle_args *args) + const struct of_phandle_args *args) { struct sun4i_usb_phy_data *data = dev_get_drvdata(dev); diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c index 2712c4bd549d..5468831d6ab9 100644 --- a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c +++ b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c @@ -350,7 +350,7 @@ static int phy_g12a_usb3_pcie_exit(struct phy *phy) } static struct phy *phy_g12a_usb3_pcie_xlate(struct device *dev, - struct of_phandle_args *args) + const struct of_phandle_args *args) { struct phy_g12a_usb3_pcie_priv *priv = dev_get_drvdata(dev); unsigned int mode; diff --git a/drivers/phy/broadcom/phy-bcm-sr-pcie.c b/drivers/phy/broadcom/phy-bcm-sr-pcie.c index 8a4aadf166cf..ff9b3862bf7a 100644 --- a/drivers/phy/broadcom/phy-bcm-sr-pcie.c +++ b/drivers/phy/broadcom/phy-bcm-sr-pcie.c @@ -195,7 +195,7 @@ static const struct phy_ops sr_paxc_phy_ops = { }; static struct phy *sr_pcie_phy_xlate(struct device *dev, -struct of_phandle_args *args) +const struct of_phandle_args *args) { struct sr_pcie_phy_core *core; int phy_idx; diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c index b0bd18a5df87..6bcfe83609c8 100644 ---
Re: [PATCH v4 15/19] drm/msm/dp: enable SDP and SDE periph flush update
On Sat, 17 Feb 2024 at 01:03, Paloma Arellano wrote: > > DP controller can be setup to operate in either SDP update flush mode or > peripheral flush mode based on the DP controller hardware version. > > Starting in DP v1.2, the hardware documents require the use of > peripheral flush mode for SDP packets such as PPS OR VSC SDP packets. > > In-line with this guidance, lets program the DP controller to use > peripheral flush mode starting DP v1.2 > > Changes in v4: > - Clear up that DP_MAINLINK_CTRL_FLUSH_MODE register requires > the use of bits [24:23] > - Modify macros DP_MAINLINK_FLUSH_MODE_UPDATE_SDP and > DP_MAINLINK_FLUSH_MODE_SDP_PERIPH_UPDATE to explicitly set > their values in the bits of DP_MAINLINK_CTRL_FLUSH_MODE_MASK > > Changes in v3: > - Clear up that the DP_MAINLINK_FLUSH_MODE_SDE_PERIPH_UPDATE > macro is setting bits [24:23] to a value of 3 > > Changes in v2: > - Use the original dp_catalog_hw_revision() function to > correctly check the DP HW version > > Signed-off-by: Paloma Arellano > --- > drivers/gpu/drm/msm/dp/dp_catalog.c | 17 + > drivers/gpu/drm/msm/dp/dp_catalog.h | 1 + > drivers/gpu/drm/msm/dp/dp_ctrl.c| 1 + > drivers/gpu/drm/msm/dp/dp_reg.h | 6 ++ > 4 files changed, 25 insertions(+) Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry
Re: [PATCH v4 13/19] drm/msm/dp: add VSC SDP support for YUV420 over DP
On Sat, 17 Feb 2024 at 01:03, Paloma Arellano wrote: > > Add support to pack and send the VSC SDP packet for DP. This therefore > allows the transmision of format information to the sinks which is > needed for YUV420 support over DP. > > Changes in v4: > - Remove struct msm_dp_sdp_with_parity > - Use dp_utils_pack_sdp_header() to pack the SDP header and > parity bytes into a buffer > - Use this buffer when writing the VSC SDP data in > dp_catalog_panel_send_vsc_sdp() > - Write to all of the MMSS_DP_GENERIC0 registers instead of just > the ones with non-zero values > > Changes in v3: > - Create a new struct, msm_dp_sdp_with_parity, which holds the > packing information for VSC SDP > - Use drm_dp_vsc_sdp_pack() to pack the data into the new > msm_dp_sdp_with_parity struct instead of specifically packing > for YUV420 format > - Modify dp_catalog_panel_send_vsc_sdp() to send the VSC SDP > data using the new msm_dp_sdp_with_parity struct > > Changes in v2: > - Rename GENERIC0_SDPSIZE macro to GENERIC0_SDPSIZE_VALID > - Remove dp_sdp from the dp_catalog struct since this data is > being allocated at the point used > - Create a new function in dp_utils to pack the VSC SDP data > into a buffer > - Create a new function that packs the SDP header bytes into a > buffer. This function is made generic so that it can be > utilized by dp_audio > header bytes into a buffer > - Create a new function in dp_utils that takes the packed buffer > and writes to the DP_GENERIC0_* registers > - Split the dp_catalog_panel_config_vsc_sdp() function into two > to disable/enable sending VSC SDP packets > - Check the DP HW version using the original useage of > dp_catalog_hw_revision() and correct the version checking > logic > - Rename dp_panel_setup_vsc_sdp() to > dp_panel_setup_vsc_sdp_yuv_420() to explicitly state that > currently VSC SDP is only being set up to support YUV420 modes > > Signed-off-by: Paloma Arellano > --- > drivers/gpu/drm/msm/dp/dp_catalog.c | 107 > drivers/gpu/drm/msm/dp/dp_catalog.h | 7 ++ > drivers/gpu/drm/msm/dp/dp_ctrl.c| 4 ++ > drivers/gpu/drm/msm/dp/dp_panel.c | 55 ++ > drivers/gpu/drm/msm/dp/dp_reg.h | 3 + > drivers/gpu/drm/msm/dp/dp_utils.c | 56 +++ > drivers/gpu/drm/msm/dp/dp_utils.h | 4 ++ > 7 files changed, 236 insertions(+) > > diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c > b/drivers/gpu/drm/msm/dp/dp_catalog.c > index 5d84c089e520a..c6e57812a239e 100644 > --- a/drivers/gpu/drm/msm/dp/dp_catalog.c > +++ b/drivers/gpu/drm/msm/dp/dp_catalog.c > @@ -901,6 +901,113 @@ int dp_catalog_panel_timing_cfg(struct dp_catalog > *dp_catalog) > return 0; > } > > +static void dp_catalog_panel_send_vsc_sdp(struct dp_catalog *dp_catalog, > struct dp_sdp *vsc_sdp, > + u32 *header) > +{ > + struct dp_catalog_private *catalog; > + u32 val; > + int i; > + > + if (!dp_catalog) { > + DRM_ERROR("invalid input\n"); > + return; > + } We are two or three levels deep in the dp_catalog. Do we really need to check that dp_catalog is not NULL? Side note: I think we should drop most of such checks. They add nothing, just clobber the code. > + catalog = container_of(dp_catalog, struct dp_catalog_private, > dp_catalog); > + > + dp_write_link(catalog, MMSS_DP_GENERIC0_0, header[0]); > + dp_write_link(catalog, MMSS_DP_GENERIC0_1, header[1]); > + > + for (i = 0; i < sizeof(vsc_sdp->db); i += 4) { > + val = ((vsc_sdp->db[i]) | (vsc_sdp->db[i + 1] << 8) | > (vsc_sdp->db[i + 2] << 16) | > + (vsc_sdp->db[i + 3] << 24)); > + dp_write_link(catalog, MMSS_DP_GENERIC0_2 + i, val); > + } > +} > + > +static void dp_catalog_panel_update_sdp(struct dp_catalog *dp_catalog) > +{ > + struct dp_catalog_private *catalog; > + u32 hw_revision; > + > + catalog = container_of(dp_catalog, struct dp_catalog_private, > dp_catalog); > + > + hw_revision = dp_catalog_hw_revision(dp_catalog); > + if (hw_revision < DP_HW_VERSION_1_2 && hw_revision >= > DP_HW_VERSION_1_0) { > + dp_write_link(catalog, MMSS_DP_SDP_CFG3, 0x01); > + dp_write_link(catalog, MMSS_DP_SDP_CFG3, 0x00); > + } > +} > + > +void dp_catalog_panel_enable_vsc_sdp(struct dp_catalog *dp_catalog, struct > dp_sdp *vsc_sdp, > +u32 *header) > +{ > + struct dp_catalog_private *catalog; > + u32 cfg, cfg2, misc; > + > + if (!dp_catalog) { > + DRM_ERROR("invalid input\n"); > + return; > +