[PATCH] drm/rockchip: cdn-dp: Remove unused functions
From: "Dr. David Alan Gilbert" cdn_dp_get_event and cdn_dp_dpcd_write were added in 2017 by commit 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399") but unused. Remove them. (Build tested only on x86-64) Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/rockchip/cdn-dp-reg.c | 39 --- drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 -- 2 files changed, 41 deletions(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c index 33fb4d05c506..a57cda971f20 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.c @@ -244,40 +244,6 @@ int cdn_dp_dpcd_read(struct cdn_dp_device *dp, u32 addr, u8 *data, u16 len) return ret; } -int cdn_dp_dpcd_write(struct cdn_dp_device *dp, u32 addr, u8 value) -{ - u8 msg[6], reg[5]; - int ret; - - msg[0] = 0; - msg[1] = 1; - msg[2] = (addr >> 16) & 0xff; - msg[3] = (addr >> 8) & 0xff; - msg[4] = addr & 0xff; - msg[5] = value; - ret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_WRITE_DPCD, - sizeof(msg), msg); - if (ret) - goto err_dpcd_write; - - ret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX, - DPTX_WRITE_DPCD, sizeof(reg)); - if (ret) - goto err_dpcd_write; - - ret = cdn_dp_mailbox_read_receive(dp, reg, sizeof(reg)); - if (ret) - goto err_dpcd_write; - - if (addr != (reg[2] << 16 | reg[3] << 8 | reg[4])) - ret = -EINVAL; - -err_dpcd_write: - if (ret) - DRM_DEV_ERROR(dp->dev, "dpcd write failed: %d\n", ret); - return ret; -} - int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem, u32 i_size, const u32 *d_mem, u32 d_size) { @@ -400,11 +366,6 @@ int cdn_dp_event_config(struct cdn_dp_device *dp) return ret; } -u32 cdn_dp_get_event(struct cdn_dp_device *dp) -{ - return readl(dp->regs + SW_EVENTS0); -} - int cdn_dp_get_hpd_status(struct cdn_dp_device *dp) { u8 status; diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.h b/drivers/gpu/drm/rockchip/cdn-dp-reg.h index 441248b7a79e..68c3dbff1123 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-reg.h +++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.h @@ -459,9 +459,7 @@ int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem, int cdn_dp_set_firmware_active(struct cdn_dp_device *dp, bool enable); int cdn_dp_set_host_cap(struct cdn_dp_device *dp, u8 lanes, bool flip); int cdn_dp_event_config(struct cdn_dp_device *dp); -u32 cdn_dp_get_event(struct cdn_dp_device *dp); int cdn_dp_get_hpd_status(struct cdn_dp_device *dp); -int cdn_dp_dpcd_write(struct cdn_dp_device *dp, u32 addr, u8 value); int cdn_dp_dpcd_read(struct cdn_dp_device *dp, u32 addr, u8 *data, u16 len); int cdn_dp_get_edid_block(void *dp, u8 *edid, unsigned int block, size_t length); -- 2.46.2
[PATCH] drm/bridge: cdns-mhdp8546: Remove unused functions
From: "Dr. David Alan Gilbert" cdns_mhdp_hdcp_set_lc() and cdns_mhdp_hdcp_set_public_key_param() were added by commit 6a3608eae6d3 ("drm: bridge: cdns-mhdp8546: Enable HDCP") but never used. Remove them. Signed-off-by: Dr. David Alan Gilbert --- .../drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 28 --- .../drm/bridge/cadence/cdns-mhdp8546-hdcp.h | 3 -- 2 files changed, 31 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c index 31832ba4017f..42248f179b69 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c @@ -500,34 +500,6 @@ static void cdns_mhdp_hdcp_prop_work(struct work_struct *work) drm_modeset_unlock(&dev->mode_config.connection_mutex); } -int cdns_mhdp_hdcp_set_lc(struct cdns_mhdp_device *mhdp, u8 *val) -{ - int ret; - - mutex_lock(&mhdp->mbox_mutex); - ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_GENERAL, - HDCP_GENERAL_SET_LC_128, - 16, val); - mutex_unlock(&mhdp->mbox_mutex); - - return ret; -} - -int -cdns_mhdp_hdcp_set_public_key_param(struct cdns_mhdp_device *mhdp, - struct cdns_hdcp_tx_public_key_param *val) -{ - int ret; - - mutex_lock(&mhdp->mbox_mutex); - ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, - HDCP2X_TX_SET_PUBLIC_KEY_PARAMS, - sizeof(*val), (u8 *)val); - mutex_unlock(&mhdp->mbox_mutex); - - return ret; -} - int cdns_mhdp_hdcp_enable(struct cdns_mhdp_device *mhdp, u8 content_type) { int ret; diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.h b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.h index 334c0b8b0d4f..3b6ec9c3a8d8 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.h +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.h @@ -82,9 +82,6 @@ struct cdns_hdcp_tx_public_key_param { u8 E[DLP_E]; }; -int cdns_mhdp_hdcp_set_public_key_param(struct cdns_mhdp_device *mhdp, - struct cdns_hdcp_tx_public_key_param *val); -int cdns_mhdp_hdcp_set_lc(struct cdns_mhdp_device *mhdp, u8 *val); int cdns_mhdp_hdcp_enable(struct cdns_mhdp_device *mhdp, u8 content_type); int cdns_mhdp_hdcp_disable(struct cdns_mhdp_device *mhdp); void cdns_mhdp_hdcp_init(struct cdns_mhdp_device *mhdp); -- 2.46.2
[PATCH 2/3] ARM: dts: st: add node for the MALI gpu on stih410.dtsi
Add the entry for the GPU (Mali400) on the stih410.dtsi Signed-off-by: Alain Volmat --- arch/arm/boot/dts/st/stih410.dtsi | 34 ++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/st/stih410.dtsi b/arch/arm/boot/dts/st/stih410.dtsi index a69231854f783b1b9fd685ba2822eb406e0ffdf5..be34de10bbcb0d1f2d527568878e3ed1ff297954 100644 --- a/arch/arm/boot/dts/st/stih410.dtsi +++ b/arch/arm/boot/dts/st/stih410.dtsi @@ -285,5 +285,39 @@ cec@94a087c { resets = <&softreset STIH407_LPM_SOFTRESET>; hdmi-phandle = <&sti_hdmi>; }; + + gpu: gpu@9f0 { + compatible = "st,sti-mali", "arm,mali-400"; + reg = <0x9f0 0x1>; + /* LIMA driver needs 2 clocks, use the same for both */ + clocks = <&clk_s_c0_flexgen CLK_ICN_GPU>, +<&clk_s_c0_flexgen CLK_ICN_GPU>; + clock-names = "bus", "core"; + assigned-clocks = <&clk_s_c0_flexgen CLK_ICN_GPU>; + assigned-clock-rates = <4>; + resets = <&softreset STIH407_GPU_SOFTRESET>; + interrupts = , +, +, +, +, +, +, +, +, +; + interrupt-names = "gp", + "gpmmu", + "pp0", + "ppmmu0", + "pp1", + "ppmmu1", + "pp2", + "ppmmu2", + "pp3", + "ppmmu3"; + + status = "disabled"; + }; }; }; -- 2.43.0
[PATCH 0/3] ARM: dts: st: add and enable MALI400 on stih410/stih410-b2260
This series adds necessary node within the stih410.dtsi for the MALI400 GPU and enable the GPU on the stih410-b2260 board. For that purpose and since the MALI400 GPU is available on the STi platform (stih410 / stih418), a new st,sti-mali compatible is also added within the mali bindings. Signed-off-by: Alain Volmat --- Alain Volmat (3): dt-bindings: gpu: mali-utgard: Add ST sti compatible ARM: dts: st: add node for the MALI gpu on stih410.dtsi ARM: dts: st: enable the MALI gpu on the stih410-b2260 .../devicetree/bindings/gpu/arm,mali-utgard.yaml | 1 + arch/arm/boot/dts/st/stih410-b2260.dts | 4 +++ arch/arm/boot/dts/st/stih410.dtsi | 34 ++ 3 files changed, 39 insertions(+) --- base-commit: 98f7e32f20d28ec452afb208f9cffc08448a2652 change-id: 20241005-sti-gpu-851d0a720e6c Best regards, -- Alain Volmat
[PATCH 3/3] ARM: dts: st: enable the MALI gpu on the stih410-b2260
Enable the GPU on the stih410-b2260 board. Signed-off-by: Alain Volmat --- arch/arm/boot/dts/st/stih410-b2260.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/st/stih410-b2260.dts b/arch/arm/boot/dts/st/stih410-b2260.dts index 240b6204b8c0357d39504d3475186958bf31..736b1e059b0a8f122d1b824e1f4e5db0a668ec2c 100644 --- a/arch/arm/boot/dts/st/stih410-b2260.dts +++ b/arch/arm/boot/dts/st/stih410-b2260.dts @@ -206,5 +206,9 @@ hdmiddc: i2c@9541000 { sata1: sata@9b28000 { status = "okay"; }; + + gpu: gpu@9f0 { + status = "okay"; + }; }; }; -- 2.43.0
[PATCH 1/3] dt-bindings: gpu: mali-utgard: Add ST sti compatible
ST STi SoC family (stih410, stih418) has a Mali400. Add a compatible for it. Signed-off-by: Alain Volmat --- Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml index abd4aa335fbcebafc9164bd4963f9db60f0450c4..97a7ef0fea1a10df0ff485b9eb4468f44c92da39 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml @@ -33,6 +33,7 @@ properties: - rockchip,rk3188-mali - rockchip,rk3228-mali - samsung,exynos4210-mali + - st,sti-mali - stericsson,db8500-mali - xlnx,zynqmp-mali - const: arm,mali-400 -- 2.43.0
Re: [PATCH v3 13/14] drm/mediatek: Support DRM plane alpha in OVL
Re: [PATCH v6 21/44] drm/vkms: Add tests for CTM handling
Hi Harry, kernel test robot noticed the following build warnings: [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.12-rc1 next-20241004] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20241004-040629 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20241003200129.1732122-22-harry.wentland%40amd.com patch subject: [PATCH v6 21/44] drm/vkms: Add tests for CTM handling config: csky-randconfig-r112-20241005 (https://download.01.org/0day-ci/archive/20241005/202410051850.cgjobkkg-...@intel.com/config) compiler: csky-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241005/202410051850.cgjobkkg-...@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/202410051850.cgjobkkg-...@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/gpu/drm/vkms/tests/vkms_color_test.c:34:29: sparse: sparse: symbol 'test_linear_lut' was not declared. Should it be static? >> drivers/gpu/drm/vkms/tests/vkms_color_test.c:193:32: sparse: sparse: symbol >> 'test_matrix_3x4_50_desat' was not declared. Should it be static? >> drivers/gpu/drm/vkms/tests/vkms_color_test.c:259:32: sparse: sparse: symbol >> 'test_matrix_3x4_bt709_enc' was not declared. Should it be static? vim +/test_matrix_3x4_50_desat +193 drivers/gpu/drm/vkms/tests/vkms_color_test.c 192 > 193 const struct drm_color_ctm_3x4 test_matrix_3x4_50_desat = { { 194 FIXPT_HALF, FIXPT_QUARTER, FIXPT_QUARTER, 0, 195 FIXPT_QUARTER, FIXPT_HALF, FIXPT_QUARTER, 0, 196 FIXPT_QUARTER, FIXPT_QUARTER, FIXPT_HALF, 0 197 } }; 198 199 static void vkms_color_ctm_3x4_50_desat(struct kunit *test) 200 { 201 struct pixel_argb_s32 ref, out; 202 203 /* full white */ 204 ref.a = 0x; 205 ref.r = 0x; 206 ref.g = 0x; 207 ref.b = 0x; 208 209 memcpy(&out, &ref, sizeof(out)); 210 apply_3x4_matrix(&out, &test_matrix_3x4_50_desat); 211 212 KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out)); 213 214 /* full black */ 215 ref.a = 0x; 216 ref.r = 0x0; 217 ref.g = 0x0; 218 ref.b = 0x0; 219 220 memcpy(&out, &ref, sizeof(out)); 221 apply_3x4_matrix(&out, &test_matrix_3x4_50_desat); 222 223 KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out)); 224 225 /* 50% grey */ 226 ref.a = 0x; 227 ref.r = 0x8000; 228 ref.g = 0x8000; 229 ref.b = 0x8000; 230 231 memcpy(&out, &ref, sizeof(out)); 232 apply_3x4_matrix(&out, &test_matrix_3x4_50_desat); 233 234 KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out)); 235 236 /* full red to 50% desat */ 237 ref.a = 0x; 238 ref.r = 0x8000; 239 ref.g = 0x4000; 240 ref.b = 0x4000; 241 242 out.a = 0x; 243 out.r = 0x; 244 out.g = 0x0; 245 out.b = 0x0; 246 247 apply_3x4_matrix(&out, &test_matrix_3x4_50_desat); 248 249 KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out)); 250 } 251 252 /* 253 * BT.709 encoding matrix 254 * 255 * Values printed from within IGT when converting 256 * igt_matrix_3x4_bt709_enc to the fixed-point format expected 257 * by DRM/KMS. 258 */ > 259 const struct drm_color_ctm_3x4 test_matrix_3x4_bt709_enc = { { 260 0x366cf400ull, 0xb7175900ull, 0x000127bb300ull, 0, 261 0x80001993b3a0ull, 0x80005609fe80ull, 0x6f9db200ull, 0, 262 0x9d70a400ull, 0x80008f011100ull, 0x8e6f9330ull, 0 263 } }; 264 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v6 36/44] drm/amd/display: add 3x4 matrix colorop
Hi Harry, kernel test robot noticed the following build errors: [auto build test ERROR on drm/drm-next] [also build test ERROR on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.12-rc1 next-20241004] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20241004-040629 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20241003200129.1732122-37-harry.wentland%40amd.com patch subject: [PATCH v6 36/44] drm/amd/display: add 3x4 matrix colorop config: i386-randconfig-063-20241005 (https://download.01.org/0day-ci/archive/20241005/202410051812.tvvprkdr-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410051812.tvvprkdr-...@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/202410051812.tvvprkdr-...@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/drm/drm_print.h:31, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:29, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:29, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:43, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:25: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c: In function '__set_dm_plane_colorop_3x4_matrix': >> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: error: format '%lu' >> expects argument of type 'long unsigned int', but argument 3 has type >> 'size_t' {aka 'unsigned int'} [-Werror=format=] 41 | #define dev_fmt(fmt) "amdgpu: " fmt | ^~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt' 156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:522:9: note: in expansion of macro 'dev_warn' 522 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) | ^~~~ include/drm/drm_print.h:532:9: note: in expansion of macro '__drm_printk' 532 | __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1247:25: note: in expansion of macro 'drm_warn' 1247 | drm_warn(dev, "blob->length (%lu) isn't equal to drm_color_ctm_3x4 (%lu)\n", | ^~~~ >> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: error: format '%lu' >> expects argument of type 'long unsigned int', but argument 4 has type >> 'unsigned int' [-Werror=format=] 41 | #define dev_fmt(fmt) "amdgpu: " fmt | ^~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt' 156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:522:9: note: in expansion of macro 'dev_warn' 522 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) | ^~~~ include/drm/drm_print.h:532:9: note: in expansion of macro '__drm_printk' 532 | __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1247:25: note: in expansion of macro 'drm_warn' 1247 | d
[PATCH 2/2] drm/msm/dsi: fix 32-bit signed integer extension in pclk_rate calculation
When (mode->clock * 1000) is larger than (1<<31), int to unsigned long conversion will sign extend the int to 64 bits and the pclk_rate value will be incorrect. Fix this by making the result of the multiplication unsigned. Note that above (1<<32) would still be broken and require more changes, but its unlikely anyone will need that anytime soon. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 1205aa398e445..a98d24b7cb00b 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -550,7 +550,7 @@ static unsigned long dsi_get_pclk_rate(const struct drm_display_mode *mode, { unsigned long pclk_rate; - pclk_rate = mode->clock * 1000; + pclk_rate = mode->clock * 1000u; if (dsc) pclk_rate = dsi_adjust_pclk_for_compression(mode, dsc); -- 2.45.1
[PATCH 1/2] drm/msm/dsi: improve/fix dsc pclk calculation
drm_mode_vrefresh() can introduce a large rounding error, avoid it. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 185d7de0bf376..1205aa398e445 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -542,7 +542,7 @@ static unsigned long dsi_adjust_pclk_for_compression(const struct drm_display_mo int new_htotal = mode->htotal - mode->hdisplay + new_hdisplay; - return new_htotal * mode->vtotal * drm_mode_vrefresh(mode); + return mult_frac(mode->clock * 1000u, new_htotal, mode->htotal); } static unsigned long dsi_get_pclk_rate(const struct drm_display_mode *mode, -- 2.45.1
Re: [PATCH 1/2] drm/msm/dsi: improve/fix dsc pclk calculation
On 10/5/24 12:31 PM, Konrad Dybcio wrote: On 5.10.2024 4:38 PM, Jonathan Marek wrote: drm_mode_vrefresh() can introduce a large rounding error, avoid it. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 185d7de0bf376..1205aa398e445 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -542,7 +542,7 @@ static unsigned long dsi_adjust_pclk_for_compression(const struct drm_display_mo int new_htotal = mode->htotal - mode->hdisplay + new_hdisplay; - return new_htotal * mode->vtotal * drm_mode_vrefresh(mode); + return mult_frac(mode->clock * 1000u, new_htotal, mode->htotal); This seems to ignore mult/div by two on certain mode flags.. is that intended? Konrad It is intended - those flags are not relevant to DSI panels, and DSC pclk adjustment is only about how DSC affects htotal.
Re: (subset) [PATCH v7 0/6] HDMI TX support in msm8998
On Wed, 24 Jul 2024 17:01:33 +0200, Marc Gonzalez wrote: > DT bits required for HDMI TX support in qcom APQ8098 (MSM8998 cousin) > Applied, thanks! [5/6] arm64: dts: qcom: msm8998: add HDMI GPIOs commit: 1b97f00d1b11ed6e349816ba7e60fa76e477fcbb [6/6] arm64: dts: qcom: add HDMI nodes for msm8998 commit: 2150c87db80cf7eed3939f32cbb18393055c58ce Best regards, -- Bjorn Andersson
Re: [PATCH v6 03/44] drm/vkms: Add kunit tests for VKMS LUT handling
Hi Harry, kernel test robot noticed the following build warnings: [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.12-rc1 next-20241004] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20241004-040629 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20241003200129.1732122-4-harry.wentland%40amd.com patch subject: [PATCH v6 03/44] drm/vkms: Add kunit tests for VKMS LUT handling config: csky-randconfig-r112-20241005 (https://download.01.org/0day-ci/archive/20241005/202410051655.9wef2chw-...@intel.com/config) compiler: csky-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241005/202410051655.9wef2chw-...@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/202410051655.9wef2chw-...@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/vkms/tests/vkms_color_test.c:33:29: sparse: sparse: symbol >> 'test_linear_lut' was not declared. Should it be static? vim +/test_linear_lut +33 drivers/gpu/drm/vkms/tests/vkms_color_test.c 32 > 33 const struct vkms_color_lut test_linear_lut = { 34 .base = test_linear_array, 35 .lut_length = TEST_LUT_SIZE, 36 .channel_value2index_ratio = 0xf000fll 37 }; 38 39 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
[PATCH] drm/mediatek: Fix XRGB format breakage for blend_modes unsupported SoCs
If the constant alpha always set, the SoCs that is not supported the ignore alpha bit will still use constant alpha. That will break the original constant alpha setting of XRGB foramt for blend_modes unsupported SoCs, such as MT8173. Make the constatnt alpha only set when setting has_alpha or supported blend_modes SoC to fix the downgrade issue. Fixes: bc46eb5d5d77 ("drm/mediatek: Support DRM plane alpha in OVL") Signed-off-by: Jason-JH.Lin --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 28 +++-- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 703cd3f6c6d3..de3addd89442 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -494,19 +494,25 @@ void mtk_ovl_layer_config(struct device *dev, unsigned int idx, con = mtk_ovl_fmt_convert(ovl, state); if (state->base.fb) { - con |= OVL_CON_AEN; - con |= state->base.alpha & OVL_CON_ALPHA; + /* +* For blend_modes supported SoCs, always set constant alpha. +* For blend_modes unsupported SoCs, set constant alpha when has_alpha is set. +*/ + if (ovl->data->blend_modes || state->base.fb->format->has_alpha) { + con |= OVL_CON_AEN; + con |= state->base.alpha & OVL_CON_ALPHA; + } + + /* +* Although the alpha channel can be ignored, CONST_BLD must be enabled +* for XRGB format, otherwise OVL will still read the value from memory. +* For RGB888 related formats, whether CONST_BLD is enabled or not won't +* affect the result. Therefore we use !has_alpha as the condition. +*/ + if (blend_mode == DRM_MODE_BLEND_PIXEL_NONE || !state->base.fb->format->has_alpha) + ignore_pixel_alpha = OVL_CONST_BLEND; } - /* CONST_BLD must be enabled for XRGB formats although the alpha channel -* can be ignored, or OVL will still read the value from memory. -* For RGB888 related formats, whether CONST_BLD is enabled or not won't -* affect the result. Therefore we use !has_alpha as the condition. -*/ - if ((state->base.fb && !state->base.fb->format->has_alpha) || - blend_mode == DRM_MODE_BLEND_PIXEL_NONE) - ignore_pixel_alpha = OVL_CONST_BLEND; - if (pending->rotation & DRM_MODE_REFLECT_Y) { con |= OVL_CON_VIRT_FLIP; addr += (pending->height - 1) * pending->pitch; -- 2.43.0
Re: [PATCH-next] Fix unintentional integer overflow
Hi Sathish, > Please collate the changes together with Lijo's suggestion as well, > "1ULL <<" instead of typecast, there are 3 occurrences of the error in > f0b19b84d391. I could only observe two instances of this error in f0b19b84d391 at: 'mask = (1 << (adev->jpeg.num_jpeg_inst * adev->jpeg.num_jpeg_rings)) - 1;` and `mask |= 1 << ((i * adev->jpeg.num_jpeg_rings) + j);` There are a few instances where we can use 1U instead of int as harvest_config uses unsigned int (adev->jpeg.harvest_config & (1 << i) However I think they should be fixed in a separate patch? Thanks and regards, Advait On Sat, 5 Oct 2024 at 09:05, Sundararaju, Sathishkumar wrote: > > > > On 10/4/2024 11:30 PM, Alex Deucher wrote: > > On Fri, Oct 4, 2024 at 5:15 AM Sundararaju, Sathishkumar > > wrote: > >> > >> All occurrences of this error fix should have been together in a single > >> patch both in _get and _set callbacks corresponding to f0b19b84d391, > >> please avoid separate patch for each occurrence. > >> > >> Sorry Alex, I missed to note this yesterday. > > I've dropped the patch. Please pick it up once it's fixed up appropriately. > Thanks Alex. > > Hi Advait, > Please collate the changes together with Lijo's suggestion as well, > "1ULL <<" instead of typecast, there are 3 occurrences of the error in > f0b19b84d391. > > Regards, > Sathish > > > > Thanks, > > > > Alex > > > >> > >> Regards, > >> Sathish > >> > >> > >> On 10/4/2024 1:46 PM, Advait Dhamorikar wrote: > >> > >> Fix shift-count-overflow when creating mask. > >> The expression's value may not be what the > >> programmer intended, because the expression is > >> evaluated using a narrower integer type. > >> > >> Fixes: f0b19b84d391 ("drm/amdgpu: add amdgpu_jpeg_sched_mask debugfs") > >> Signed-off-by: Advait Dhamorikar > >> --- > >> drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > >> index 95e2796919fc..7df402c45f40 100644 > >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > >> @@ -388,7 +388,7 @@ static int amdgpu_debugfs_jpeg_sched_mask_get(void > >> *data, u64 *val) > >>for (j = 0; j < adev->jpeg.num_jpeg_rings; ++j) { > >>ring = &adev->jpeg.inst[i].ring_dec[j]; > >>if (ring->sched.ready) > >> - mask |= 1 << ((i * adev->jpeg.num_jpeg_rings) + j); > >> + mask |= (u64)1 << ((i * adev->jpeg.num_jpeg_rings) + j); > >>} > >>} > >>*val = mask; >
Re: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block
Hi Harry, kernel test robot noticed the following build errors: [auto build test ERROR on drm/drm-next] [also build test ERROR on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.12-rc1 next-20241004] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20241004-040629 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20241003200129.1732122-30-harry.wentland%40amd.com patch subject: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block config: x86_64-randconfig-122-20241005 (https://download.01.org/0day-ci/archive/20241005/202410052207.g19vlhrt-...@intel.com/config) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410052207.g19vlhrt-...@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/202410052207.g19vlhrt-...@intel.com/ All errors (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1296:46: >> error: variable 'blend_size' is uninitialized when used here >> [-Werror,-Wuninitialized] 1296 | return __set_input_tf(NULL, tf, blend_lut, blend_size); |^~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1278:21: note: initialize the variable 'blend_size' to silence this warning 1278 | uint32_t blend_size; |^ | = 0 1 error generated. vim +/blend_size +1296 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c 1273 1274 struct dc_transfer_func *tf = &dc_plane_state->blend_tf; 1275 struct drm_colorop *colorop = colorop_state->colorop; 1276 struct drm_device *drm = colorop->dev; 1277 const struct drm_color_lut *blend_lut; 1278 uint32_t blend_size; 1279 1280 if (colorop->type != DRM_COLOROP_1D_CURVE && 1281 colorop_state->curve_1d_type != DRM_COLOROP_1D_CURVE_SRGB_EOTF) 1282 return -EINVAL; 1283 1284 if (colorop_state->bypass) { 1285 tf->type = TF_TYPE_BYPASS; 1286 tf->tf = TRANSFER_FUNCTION_LINEAR; 1287 return 0; 1288 } 1289 1290 drm_dbg(drm, "Blend colorop with ID: %d\n", colorop->base.id); 1291 1292 if (colorop->type == DRM_COLOROP_1D_CURVE) { 1293 tf->type = TF_TYPE_DISTRIBUTED_POINTS; 1294 tf->tf = amdgpu_colorop_tf_to_dc_tf(colorop_state->curve_1d_type); 1295 tf->sdr_ref_white_level = SDR_WHITE_LEVEL_INIT_VALUE; > 1296 return __set_input_tf(NULL, tf, blend_lut, blend_size); 1297 } 1298 1299 return -EINVAL; 1300 } 1301 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block
Hi Harry, kernel test robot noticed the following build warnings: [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-exynos/exynos-drm-next drm-misc/drm-misc-next linus/master v6.12-rc1 next-20241004] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20241004-040629 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20241003200129.1732122-30-harry.wentland%40amd.com patch subject: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241005/202410052046.3g21jba1-...@intel.com/config) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410052046.3g21jba1-...@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/202410052046.3g21jba1-...@intel.com/ All warnings (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1296:46: >> warning: variable 'blend_size' is uninitialized when used here >> [-Wuninitialized] 1296 | return __set_input_tf(NULL, tf, blend_lut, blend_size); |^~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1278:21: note: initialize the variable 'blend_size' to silence this warning 1278 | uint32_t blend_size; |^ | = 0 1 warning generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for MODVERSIONS Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y] Selected by [y]: - RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=y] || GCC_PLUGINS [=n]) && MODULES [=y] vim +/blend_size +1296 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c 1273 1274 struct dc_transfer_func *tf = &dc_plane_state->blend_tf; 1275 struct drm_colorop *colorop = colorop_state->colorop; 1276 struct drm_device *drm = colorop->dev; 1277 const struct drm_color_lut *blend_lut; 1278 uint32_t blend_size; 1279 1280 if (colorop->type != DRM_COLOROP_1D_CURVE && 1281 colorop_state->curve_1d_type != DRM_COLOROP_1D_CURVE_SRGB_EOTF) 1282 return -EINVAL; 1283 1284 if (colorop_state->bypass) { 1285 tf->type = TF_TYPE_BYPASS; 1286 tf->tf = TRANSFER_FUNCTION_LINEAR; 1287 return 0; 1288 } 1289 1290 drm_dbg(drm, "Blend colorop with ID: %d\n", colorop->base.id); 1291 1292 if (colorop->type == DRM_COLOROP_1D_CURVE) { 1293 tf->type = TF_TYPE_DISTRIBUTED_POINTS; 1294 tf->tf = amdgpu_colorop_tf_to_dc_tf(colorop_state->curve_1d_type); 1295 tf->sdr_ref_white_level = SDR_WHITE_LEVEL_INIT_VALUE; > 1296 return __set_input_tf(NULL, tf, blend_lut, blend_size); 1297 } 1298 1299 return -EINVAL; 1300 } 1301 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
[PATCH] drm: renesas: rz-du: rzg2l_du_crtc: Fix max dot clock for DPI
As per the RZ/G2UL hardware manual Table 33.4 Clock List, the maximum dot clock for the DPI interface is 83.5 MHz. Add mode_valid callback to reject modes greater than 83.5 MHz. Signed-off-by: Biju Das --- Before applying the patch: root@smarc-rzg2ul:~# modetest -M rzg2l-du Encoders: id crtctypepossible crtcs possible clones 37 36 none0x0001 0x0001 Connectors: id encoder status namesize (mm) modes encoders 38 37 connected HDMI-A-1520x320 30 37 modes: index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot) #0 1920x1080 59.72 1920 1968 2000 2080 1080 1082 1087 138000 flags: phsync, nvsync; type: preferred, driver #1 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver #2 1920x1080 59.94 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver #3 1920x1080 59.94 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver #4 1280x1024 75.02 1280 1296 1440 1688 1024 1025 1028 1066 135000 flags: phsync, pvsync; type: driver #5 1280x1024 60.02 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver #6 1152x864 75.00 1152 1216 1344 1600 864 865 868 900 108000 flags: phsync, pvsync; type: driver #7 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: userdef, driver #8 1280x720 59.94 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver #9 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver ... After applying the patch: root@smarc-rzg2ul:~# modetest -M rzg2l-du Encoders: id crtctypepossible crtcs possible clones 37 36 none0x0001 0x0001 Connectors: id encoder status namesize (mm) modes encoders 38 37 connected HDMI-A-1520x320 23 37 modes: index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot) #0 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver #1 1280x720 59.94 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver #2 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver #3 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver #4 1024x768 75.03 1024 1040 1136 1312 768 769 772 800 78750 flags: phsync, pvsync; type: driver #5 1024x768 70.07 1024 1048 1184 1328 768 771 777 806 75000 flags: nhsync, nvsync; type: driver #6 1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver #7 1080x607 59.97 1080 1120 1232 1384 607 608 611 629 52210 flags: nhsync, pvsync; type: #8 832x624 74.55 832 864 928 1152 624 625 628 667 57284 flags: nhsync, nvsync; type: driver #9 800x600 75.00 800 816 896 1056 600 601 604 625 49500 flags: phsync, pvsync; type: driver ... --- drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c index 6e7aac6219be..650a2e40caf5 100644 --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c @@ -248,6 +248,32 @@ static void rzg2l_du_crtc_stop(struct rzg2l_du_crtc *rcrtc) * CRTC Functions */ +static int rzg2l_du_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_atomic_state *state) +{ + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, + crtc); + struct rzg2l_du_crtc_state *rstate = to_rzg2l_crtc_state(crtc_state); + struct drm_encoder *encoder; + + /* Store the routes from the CRTC output to the DU outputs. */ + rstate->outputs = 0; + + drm_for_each_encoder_mask(encoder, crtc->dev, + crtc_state->encoder_mask) { + struct rzg2l_du_encoder *renc; + + /* Skip the writeback encoder. */ + if (encoder->encoder_type == DRM_MODE_ENCODER_VIRTUAL) + continue; + + renc = to_rzg2l_encoder(encoder); + rstate->outputs |= BIT(renc->output); + } + + return 0; +} + static void rzg2l_du_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state) { @@ -295,10 +321,27 @@ static void rzg2l_du_crtc_atomic_flush(struct drm_crtc *crtc, rzg2l_du_vsp_atomic_flush(rcrtc); } +static enum drm_mode_status +rzg2l_du_crtc_mode_valid(struct drm_crtc *crtc, +const struct drm_display_mode *mode) +{ + struct rzg2l_du_crt
Re: [PATCH][next] drm/nouveau: Avoid -Wflex-array-member-not-at-end warning
>On 03/10/24 12:36, Danilo Krummrich wrote: >> On 9/13/24 12:23 PM, Danilo Krummrich wrote: I am reminded that I should check all my MUAs to render the date as -MM-DD so my brain doesn't explode when I see people "time traveling". ;) (BTW, what MUAs do you both use? I use Mutt and K-9 Mail, and I need to check the quote prefix settings in both...) -Kees -- Kees Cook
[PATCH v3 2/2] drm/panthor: Fix OPP refcnt leaks in devfreq initialisation
Rearrange lookup of recommended OPP for the Mali GPU device and its refcnt decremental to make sure no OPP object leaks happen in the error path. Signed-off-by: Adrián Larumbe Fixes: fac9b22df4b1 ("drm/panthor: Add the devfreq logical block") Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_devfreq.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_devfreq.c b/drivers/gpu/drm/panthor/panthor_devfreq.c index 9d0f891b9b53..ecc7a52bd688 100644 --- a/drivers/gpu/drm/panthor/panthor_devfreq.c +++ b/drivers/gpu/drm/panthor/panthor_devfreq.c @@ -163,13 +163,6 @@ int panthor_devfreq_init(struct panthor_device *ptdev) cur_freq = clk_get_rate(ptdev->clks.core); - opp = devfreq_recommended_opp(dev, &cur_freq, 0); - if (IS_ERR(opp)) - return PTR_ERR(opp); - - panthor_devfreq_profile.initial_freq = cur_freq; - ptdev->current_frequency = cur_freq; - /* Regulator coupling only takes care of synchronizing/balancing voltage * updates, but the coupled regulator needs to be enabled manually. * @@ -200,18 +193,24 @@ int panthor_devfreq_init(struct panthor_device *ptdev) return ret; } + opp = devfreq_recommended_opp(dev, &cur_freq, 0); + if (IS_ERR(opp)) + return PTR_ERR(opp); + + panthor_devfreq_profile.initial_freq = cur_freq; + ptdev->current_frequency = cur_freq; + /* * Set the recommend OPP this will enable and configure the regulator * if any and will avoid a switch off by regulator_late_cleanup() */ ret = dev_pm_opp_set_opp(dev, opp); + dev_pm_opp_put(opp); if (ret) { DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n"); return ret; } - dev_pm_opp_put(opp); - /* Find the fastest defined rate */ opp = dev_pm_opp_find_freq_floor(dev, &freq); if (IS_ERR(opp)) -- 2.46.2
[PATCH v3 1/2] drm/panfrost: Add missing OPP table refcnt decremental
Commit f11b0417eec2 ("drm/panfrost: Add fdinfo support GPU load metrics") retrieves the OPP for the maximum device clock frequency, but forgets to keep the reference count balanced by putting the returned OPP object. This eventually leads to an OPP core warning when removing the device. Fix it by putting OPP objects as many times as they're retrieved. Also remove an unnecessary whitespace. Signed-off-by: Adrián Larumbe Fixes: f11b0417eec2 ("drm/panfrost: Add fdinfo support GPU load metrics") Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c index 2d30da38c2c3..3385fd3ef41a 100644 --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c @@ -38,7 +38,7 @@ static int panfrost_devfreq_target(struct device *dev, unsigned long *freq, return PTR_ERR(opp); dev_pm_opp_put(opp); - err = dev_pm_opp_set_rate(dev, *freq); + err = dev_pm_opp_set_rate(dev, *freq); if (!err) ptdev->pfdevfreq.current_frequency = *freq; @@ -182,6 +182,7 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev) * if any and will avoid a switch off by regulator_late_cleanup() */ ret = dev_pm_opp_set_opp(dev, opp); + dev_pm_opp_put(opp); if (ret) { DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n"); return ret; -- 2.46.2
Re: [PATCH v3 13/14] drm/mediatek: Support DRM plane alpha in OVL
On 10/5/24 05:02, Jason-JH Lin (林睿祥) wrote: > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > @@ -102,12 +102,9 @@ static inline bool is_10bit_rgb(u32 fmt) > } > > static const u32 mt8173_formats[] = { > - DRM_FORMAT_XRGB, > DRM_FORMAT_ARGB, > - DRM_FORMAT_BGRX, > DRM_FORMAT_BGRA, > DRM_FORMAT_ABGR, > - DRM_FORMAT_XBGR, > DRM_FORMAT_RGB888, > DRM_FORMAT_BGR888, > DRM_FORMAT_RGB565, This is what I get on MT6735: [1.729467] mediatek-drm mediatek-drm.1.auto: [drm] bpp/depth value of 32/24 not supported [1.73] mediatek-drm mediatek-drm.1.auto: [drm] No compatible format found [1.745943] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* fbdev-dma: Failed to setup generic emulation (ret=-22) Hi Adam, Yassine, Please try the patches below and check if they can fix the downgrade issue: [1] Fix degradation problem of alpha blending series - https://patchwork.kernel.org/project/linux-mediatek/list/?series=893634 [2] drm/mediatek: Fix XRGB format breakage for blend_modes unsupported SoCs - https://patchwork.kernel.org/project/linux-mediatek/patch/20241005095234.12925-1-jason-jh@mediatek.com/ Regards, Jason-JH.Lin Jason, I've built 6.12-rc1 with those patch series applied. (I am also not reverting the other commit.) This fixes the issue - I'm able to see the console now. Thank you! Hopefully these can go into 6.12? - Adam Thiede
Re: [PATCH 1/2] dt-bindings: display: bridge: tc358768: switch to bus-width
On Thu, 03 Oct 2024 15:39:03 +0200, Krzysztof Kozlowski wrote: > "data-lines" property is way too similar to "data-lanes". It is also > duplicating "bus-width" from video-interfaces.yaml schema. Deprecate > "data-lines" and use the common property. > > Signed-off-by: Krzysztof Kozlowski > --- > .../devicetree/bindings/display/bridge/toshiba,tc358768.yaml | 4 > 1 file changed, 4 insertions(+) > Reviewed-by: Rob Herring (Arm)
Re: [PATCH] gpu/drm: set gamma_lut or degamma_lut based on HW in setcmap_atomic
Hi Vamsi, kernel test robot noticed the following build errors: [auto build test ERROR on 7ec462100ef9142344ddbf86f2c3008b97acddbe] url: https://github.com/intel-lab-lkp/linux/commits/Vamsi-Krishna-Brahmajosyula/gpu-drm-set-gamma_lut-or-degamma_lut-based-on-HW-in-setcmap_atomic/20241003-200835 base: 7ec462100ef9142344ddbf86f2c3008b97acddbe patch link: https://lore.kernel.org/r/20241003120655.53663-1-vamsikrishna.brahmajosyula%40gmail.com patch subject: [PATCH] gpu/drm: set gamma_lut or degamma_lut based on HW in setcmap_atomic config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241006/202410060802.ln9ygpuy-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410060802.ln9ygpuy-...@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/202410060802.ln9ygpuy-...@intel.com/ All errors (new ones prefixed by >>, old ones prefixed by <<): >> ERROR: modpost: "drm_mode_obj_find_prop_id" >> [drivers/gpu/drm/drm_kms_helper.ko] undefined! -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: (subset) [PATCH 00/35] Reorganize kerneldoc parameter names
On Mon, 30 Sep 2024 13:20:46 +0200, Julia Lawall wrote: > Reorganize kerneldoc parameter names to match the parameter > order in the function header. > > The misordered cases were identified using the following > Coccinelle semantic patch: > > // > @initialize:ocaml@ > @@ > > [...] Applied, thanks! [24/35] soc: qcom: qmi: Reorganize kerneldoc parameter names commit: eea73fa08e69fec9cdc915592022bec6a9ac8ad7 Best regards, -- Bjorn Andersson