Re: [Freedreno] [PATCH 02/11] drm/msm/dpu: use the actual lm maximum width instead of a hardcoded value

2023-05-22 Thread Arnaud Vrac
Le sam. 20 mai 2023 à 22:49, Dmitry Baryshkov a écrit : > > On 20/04/2023 20:47, Jeykumar Sankaran wrote: > > > > > > On 4/19/2023 3:23 PM, Dmitry Baryshkov wrote: > >> On 19/04/2023 17:41, Arnaud Vrac wrote: > >>> This avoids using two LMs instead of one when the display width is lower > >>> than

Re: [Freedreno] [PATCH v12 3/9] drm/display/dsc: Add drm_dsc_get_bpp_int helper

2023-05-22 Thread Jani Nikula
On Wed, 17 May 2023, Jessica Zhang wrote: > Add helper to get the integer value of drm_dsc_config.bits_per_pixel > > Reviewed-by: Marijn Suijten > Signed-off-by: Jessica Zhang > --- > include/drm/display/drm_dsc_helper.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/dr

Re: [Freedreno] [PATCH v12 1/9] drm/display/dsc: Add flatness and initial scale value calculations

2023-05-22 Thread Jani Nikula
On Wed, 17 May 2023, Jessica Zhang wrote: > Add helpers to calculate det_thresh_flatness and initial_scale_value as > these calculations are defined within the DSC spec. > > Reviewed-by: Marijn Suijten > Signed-off-by: Jessica Zhang > --- > include/drm/display/drm_dsc_helper.h | 10 ++ >

[Freedreno] [PATCH v3 03/12] drm/exynos: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Exynos does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirel

[Freedreno] [PATCH v3 00/12] drm/fbdev: Remove DRM's helpers for fbdev I/O

2023-05-22 Thread Thomas Zimmermann
DRM provides a number of wrappers around fbdev cfb_() sys_(), fb_io_() and fb_sys_() helpers. The DRM functions don't provide any additional functionality for most DRM drivers. So remove them and call the fbdev I/O helpers directly. The DRM fbdev I/O wrappers were originally added because does no

[Freedreno] [PATCH v3 01/12] fbdev: Add Kconfig options to select different fb_ops helpers

2023-05-22 Thread Thomas Zimmermann
Many fbdev drivers use the same set of fb_ops helpers. Add Kconfig options to select them at once. This will help with making DRM's fbdev emulation code more modular, but can also be used to simplify fbdev's driver configs. v3: * fix select statement (Jingfeng) Signed-off-by: Thomas Zimme

[Freedreno] [PATCH v3 04/12] drm/gma500: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Gma500 does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirel

[Freedreno] [PATCH v3 08/12] drm/omapdrm: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Omapdrm does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entire

[Freedreno] [PATCH v3 06/12] drm/fbdev-dma: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Fbdev-dma does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions enti

[Freedreno] [PATCH v3 05/12] drm/radeon: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Radeon does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirel

[Freedreno] [PATCH v3 07/12] drm/msm: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Msm does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely.

[Freedreno] [PATCH v3 02/12] drm/armada: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Armada does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirel

[Freedreno] [PATCH v3 09/12] drm/tegra: Use regular fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Tegra does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely

[Freedreno] [PATCH v3 10/12] drm/fb-helper: Export helpers for marking damage areas

2023-05-22 Thread Thomas Zimmermann
Export drm_fb_helper_damage() and drm_fb_helper_damage_range(), which handle damage areas for fbdev emulation. This is a temporary export that allows to move the DRM I/O helpers for fbdev into drivers. Only fbdev-generic and i915 need them. Both will be updated to implement damage handling by thems

[Freedreno] [PATCH v3 12/12] drm/i915: Implement dedicated fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Implement dedicated fbdev helpers for framebuffer I/O instead of using DRM's helpers. i915 was the only caller of the DRM helpers, so remove them from the helper module. v2: * use FB_IO_HELPERS options Signed-off-by: Thomas Zimmermann Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Viv

[Freedreno] [PATCH v3 11/12] drm/fbdev-generic: Implement dedicated fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Implement dedicated fbdev helpers for framebuffer I/O instead of using DRM's helpers. Fbdev-generic was the only caller of the DRM helpers, so remove them from the helper module. v2: * use FB_SYS_HELPERS_DEFERRED option Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Kconfig

Re: [Freedreno] [PATCH v10 00/10] drm/hdcp: Pull HDCP auth/exchange/check into helpers

2023-05-22 Thread Rodrigo Vivi
On Sat, May 20, 2023 at 02:07:51AM +0300, Dmitry Baryshkov wrote: > On 20/05/2023 00:16, Rodrigo Vivi wrote: > > On Fri, May 19, 2023 at 07:55:47PM +0300, Dmitry Baryshkov wrote: > > > On 19/04/2023 18:43, Mark Yacoub wrote: > > > > Hi all, > > > > This is v10 of the HDCP patches. The patches are a

Re: [Freedreno] [PATCH v3 11/12] drm/fbdev-generic: Implement dedicated fbdev I/O helpers

2023-05-22 Thread Dmitry Baryshkov
On Mon, 22 May 2023 at 15:22, Thomas Zimmermann wrote: > > Implement dedicated fbdev helpers for framebuffer I/O instead > of using DRM's helpers. Fbdev-generic was the only caller of the > DRM helpers, so remove them from the helper module. > > v2: > * use FB_SYS_HELPERS_DEFERRED option >

Re: [Freedreno] [PATCH v2 3/3] drm/bridge: display-connector: handle hdmi-pwr supply

2023-05-22 Thread Neil Armstrong
On 19/05/2023 20:40, Dmitry Baryshkov wrote: On some devices the +5V Power pin of the HDMI connector and/or the ESD protection logic is powered on by a separate regulator. Instead of declaring this regulator as always-on, make hdmi-connector support the additional hdmi-pwr supply. Signed-off-by:

Re: [Freedreno] [PATCH 1/6] drm/msm/dpu: don't set DPU_INTF_TE globally

2023-05-22 Thread Neil Armstrong
On 22/05/2023 02:42, Dmitry Baryshkov wrote: Using BIT(DPU_INTF_TE) in INTF_SC7180_MASK (and by extension in INTF_SC7280_MASK) results in this bit (and corrsponding operations) being enabled for all interfaces, even the ones which do not have TE block. Move this bit setting to INTF_DSI_TE(), so t

Re: [Freedreno] [PATCH 2/6] drm/msm/dpu: inline __intr_offset

2023-05-22 Thread Neil Armstrong
On 22/05/2023 02:42, Dmitry Baryshkov wrote: Inline __intr_offset(), there is no point in having a separate oneline function for setting base block address. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 8 +--- 1 file changed, 1 insertion(+), 7 d

Re: [Freedreno] [PATCH 3/6] drm/msm/dpu: split interrupt address arrays

2023-05-22 Thread Neil Armstrong
Hi, On 22/05/2023 02:42, Dmitry Baryshkov wrote: There is no point in having a single enum (and a single array) for both DPU < 7.0 and DPU >= 7.0 interrupt registers. Instead define a single enum and two IRQ address arrays. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw

Re: [Freedreno] [PATCH 5/6] drm/msm/dpu: drop now-unused mdss_irqs field from hw catalog

2023-05-22 Thread Neil Armstrong
On 22/05/2023 02:42, Dmitry Baryshkov wrote: Now as the list of the interrupts is constructed from the catalog data, drop the mdss_irqs field from catalog. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h| 8 .../gpu/drm/msm/disp/dpu1/catalog/

Re: [Freedreno] [PATCH 6/6] drm/msm/dpu: drop compatibility INTR defines

2023-05-22 Thread Neil Armstrong
On 22/05/2023 02:42, Dmitry Baryshkov wrote: While reworking interrupts masks, it was easier to keep old MDP_INTFn_7xxx_INTR and MDP_INTFn_7xxx_TEAR_INTR symbols. Now it is time to drop them and use unified symbol names. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/catalog/dp

Re: [Freedreno] [PATCH 3/6] drm/msm/dpu: split interrupt address arrays

2023-05-22 Thread Dmitry Baryshkov
On 22/05/2023 17:36, Neil Armstrong wrote: Hi, On 22/05/2023 02:42, Dmitry Baryshkov wrote: There is no point in having a single enum (and a single array) for both DPU < 7.0 and DPU >= 7.0 interrupt registers. Instead define a single enum and two IRQ address arrays. Signed-off-by: Dmitry Barys

Re: [Freedreno] [PATCH v3 3/5] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag

2023-05-22 Thread Jessica Zhang
On 5/19/2023 2:34 PM, Marijn Suijten wrote: On 2023-05-19 14:17:28, Jessica Zhang wrote: Add DATA_COMPRESS feature flag to DPU INTF block. In DPU 7.x and later, DSC/DCE enablement registers have been moved from PINGPONG to INTF. Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang ---

Re: [Freedreno] [PATCH v3 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Jessica Zhang
On 5/20/2023 1:07 AM, Marijn Suijten wrote: On 2023-05-19 14:17:26, Jessica Zhang wrote: Currently, when compression is enabled, hdisplay is reduced via integer division. This causes issues for modes where the original hdisplay is not a multiple of 3. To fix this, use DIV_ROUND_UP to divide

Re: [Freedreno] [PATCH v3 5/5] drm/msm/dsi: Remove incorrect references to slice_count

2023-05-22 Thread Jessica Zhang
On 5/20/2023 5:32 PM, Dmitry Baryshkov wrote: On 20/05/2023 00:17, Jessica Zhang wrote: Currently, slice_count is being used to calculate word count and pkt_per_line. In downstream, these values are calculated using slice per packet, which is not the same as slice_count. I'd say the referen

Re: [Freedreno] [PATCH v3 11/12] drm/fbdev-generic: Implement dedicated fbdev I/O helpers

2023-05-22 Thread Thomas Zimmermann
Hi Am 22.05.23 um 15:20 schrieb Dmitry Baryshkov: On Mon, 22 May 2023 at 15:22, Thomas Zimmermann wrote: Implement dedicated fbdev helpers for framebuffer I/O instead of using DRM's helpers. Fbdev-generic was the only caller of the DRM helpers, so remove them from the helper module. v2:

[Freedreno] [PATCH] drm/msm: Use struct fb_info.screen_buffer

2023-05-22 Thread Thomas Zimmermann
The fbdev framebuffer is in system memory. Store the address in the field 'screen_buffer'. Fixes the following sparse warning. ../drivers/gpu/drm/msm/msm_fbdev.c:124:26: warning: incorrect type in assignment (different address spaces) ../drivers/gpu/drm/msm/msm_fbdev.c:124:26:expected char [n

[Freedreno] [PATCH v12 03/10] drm/msm/dpu: add DPU_PINGPONG_DSC feature bit for DPU < 7.0.0

2023-05-22 Thread Kuogee Hsieh
DPU < 7.0.0 requires the PINGPONG block to be involved during DSC setting up. Since DPU >= 7.0.0, enabling and starting the DSC encoder engine was moved to INTF with the help of the flush mechanism. Add a DPU_PINGPONG_DSC feature bit to restrict the availability of dpu_hw_pp_setup_dsc() and dpu_hw_

[Freedreno] [PATCH v12 02/10] drm/msm/dpu: add dsc blocks to the catalog of MSM8998 and SC8180X

2023-05-22 Thread Kuogee Hsieh
From: Abhinav Kumar Some platforms have DSC blocks which have not been declared in the catalog. Complete DSC 1.1 support for all platforms by adding the missing blocks to MSM8998 and SC8180X. Changes in v9: -- add MSM8998 and SC8180x to commit title Changes in v10: -- fix grammar at commit text

[Freedreno] [PATCH v12 05/10] drm/msm/dpu: Introduce PINGPONG_NONE to disconnect DSC from PINGPONG

2023-05-22 Thread Kuogee Hsieh
Disabling the crossbar mux between DSC and PINGPONG currently requires a bogus enum dpu_pingpong value to be passed when calling dsc_bind_pingpong_blk() with enable=false, even though the register value written is independent of the current PINGPONG block. Replace that `bool enable` parameter with

[Freedreno] [PATCH v12 07/10] drm/msm/dpu: always clear every individual pending flush mask

2023-05-22 Thread Kuogee Hsieh
There are two tiers of pending flush control, main controller and individual hardware block. Currently only the main controller of flush mask is reset to 0 but leave out some individual pending flush mask of particular hardware block keep previous value at clear_pending_flush(). Reset all individua

[Freedreno] [PATCH v12 04/10] drm/msm/dpu: Guard PINGPONG DSC ops behind DPU_PINGPONG_DSC bit

2023-05-22 Thread Kuogee Hsieh
DPU < 7.0.0 has DPU_PINGPONG_DSC feature bit set to indicate it requires both dpu_hw_pp_setup_dsc() and dpu_hw_pp_dsc_{enable,disable}() to be executed to complete DSC configuration if DSC hardware block is present. Hence test DPU_PINGPONG_DSC feature bit and assign DSC related functions to the ops

[Freedreno] [PATCH v12 10/10] drm/msm/dpu: tear down DSC data path when DSC disabled

2023-05-22 Thread Kuogee Hsieh
Unset DSC_ACTIVE bit at dpu_hw_ctl_reset_intf_cfg_v1(), dpu_encoder_unprep_dsc() and dpu_encoder_dsc_pipe_clr() functions to tear down DSC data path if DSC data path was setup previous. Changes in V10: -- pass ctl directly instead of dpu_enc to dsc_pipe_cfg() -- move both dpu_encoder_unprep_dsc()

[Freedreno] [PATCH v12 00/10] add DSC 1.2 dpu supports

2023-05-22 Thread Kuogee Hsieh
This series adds the DPU side changes to support DSC 1.2 encoder. This was validated with both DSI DSC 1.2 panel and DP DSC 1.2 monitor. The DSI and DP parts will be pushed later on top of this change. This seriel is rebase on [1], [2] and catalog fixes from rev-4 of [3]. [1]: https://patchwork.fr

[Freedreno] [PATCH v12 01/10] drm/msm/dpu: set DSC flush bit correctly at MDP CTL flush register

2023-05-22 Thread Kuogee Hsieh
DSC flush bit is the bit 22 of CTL flush register. BIT(22) is expected to be written to CTL flush register to indicates that DSC is ready for flush. However 0x22 (BIT(1) and BIT(5)) was written mistakenly at current implementation. Fix this problem by writing BIT(22) to CTL flush register for DSC t

[Freedreno] [PATCH v12 08/10] drm/msm/dpu: separate DSC flush update out of interface

2023-05-22 Thread Kuogee Hsieh
Currently DSC flushing happens during interface configuration at dpu_hw_ctl_intf_cfg_v1(). Separate DSC flush away from dpu_hw_ctl_intf_cfg_v1() by adding dpu_hw_ctl_update_pending_flush_dsc_v1() to handle both per-DSC engine and DSC flush bits at same time to make it consistent with the location o

[Freedreno] [PATCH v12 06/10] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-22 Thread Kuogee Hsieh
Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Changes in v3: -- fixed kernel test rebot report that "__iomem *off" is declared but not used at dpu_hw_dsc_config_1_2() -- unrolling thresh loops Changes in v4: -- delete DPU_DSC_HW_REV_1_1 -- delete

[Freedreno] [PATCH v12 09/10] drm/msm/dpu: add DSC 1.2 hw blocks for relevant chipsets

2023-05-22 Thread Kuogee Hsieh
From: Abhinav Kumar Add DSC 1.2 hardware blocks to the catalog with necessary sub-block and feature flag information. Each display compression engine (DCE) contains dual DSC encoders so both share same base address but with its own different sub block address. changes in v4: -- delete DPU_DSC_H

[Freedreno] [PATCH v2] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Kuogee Hsieh
The internal_hpd flag was introduced to handle external DP HPD derived from GPIO pinmuxed into DP controller. HPD plug/unplug interrupts cannot be enabled until internal_hpd flag is set to true. At both bootup and resume time, the DP driver will enable external DP plugin interrupts and handle plugi

Re: [Freedreno] [PATCH v2] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Dmitry Baryshkov
On 22/05/2023 23:08, Kuogee Hsieh wrote: The internal_hpd flag was introduced to handle external DP HPD derived from GPIO pinmuxed into DP controller. HPD plug/unplug interrupts cannot be enabled until internal_hpd flag is set to true. At both bootup and resume time, the DP driver will enable ext

Re: [Freedreno] [PATCH v12 01/10] drm/msm/dpu: set DSC flush bit correctly at MDP CTL flush register

2023-05-22 Thread Dmitry Baryshkov
On 22/05/2023 22:30, Kuogee Hsieh wrote: DSC flush bit is the bit 22 of CTL flush register. BIT(22) is expected to be written to CTL flush register to indicates that DSC is ready for flush. However 0x22 (BIT(1) and BIT(5)) was written mistakenly at current DSC_IDX is 22, not 0x22. implementat

[Freedreno] [PATCH v4 0/5] Add DSC v1.2 Support for DSI

2023-05-22 Thread Jessica Zhang
This is a series of changes for DSI to enable command mode support for DSC v1.2. This includes: 1) Rounding up `hdisplay / 3` in dsc_timing_setup() 2) Adjusting pclk_rate to account for compression 3) Fixing incorrect uses of slice_count in DSI DSC calculations 4) Setting the DATA_COMPRESS bit wh

[Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Jessica Zhang
Currently, when compression is enabled, hdisplay is reduced via integer division. This causes issues for modes where the original hdisplay is not a multiple of 3. To fix this, use DIV_ROUND_UP to divide hdisplay. Reviewed-by: Marijn Suijten Suggested-by: Marijn Suijten Fixes: 08802f515c3cf ("dr

[Freedreno] [PATCH v4 5/5] drm/msm/dsi: Remove incorrect references to slice_count

2023-05-22 Thread Jessica Zhang
Currently, slice_count is being used to calculate word count and pkt_per_line. Instead, these values should be calculated using slice per packet, which is not the same as slice_count. Slice count represents the number of soft slices per interface, and its value will not always match that of slice

[Freedreno] [PATCH v4 4/5] drm/msm/dpu: Set DATA_COMPRESS for command mode

2023-05-22 Thread Jessica Zhang
Add a DPU INTF op to set DATA_COMPRESS register if the DPU_INTF_DATA_COMPRESS feature is enabled. This bit needs to be set in order for DSC v1.2 to work. Note: For now, this op is called for command mode encoders only. Changes to set DATA_COMPRESS for video mode encoders will be posted along with

[Freedreno] [PATCH v4 2/5] drm/msm/dsi: Adjust pclk rate for compression

2023-05-22 Thread Jessica Zhang
Adjust the pclk rate to divide hdisplay by the compression ratio when DSC is enabled. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu

[Freedreno] [PATCH v4 3/5] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag

2023-05-22 Thread Jessica Zhang
Add DATA_COMPRESS feature flag to DPU INTF block. In DPU 7.x and later, DSC/DCE enablement registers have been moved from PINGPONG to INTF. Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 3 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Marijn Suijten
On 2023-05-22 13:30:20, Jessica Zhang wrote: > Currently, when compression is enabled, hdisplay is reduced via integer > division. This causes issues for modes where the original hdisplay is > not a multiple of 3. > > To fix this, use DIV_ROUND_UP to divide hdisplay. > > Reviewed-by: Marijn Suijt

Re: [Freedreno] [PATCH v4 3/5] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag

2023-05-22 Thread Marijn Suijten
Can you fit DPU >= 7.0 in the title? On 2023-05-22 13:30:22, Jessica Zhang wrote: > Add DATA_COMPRESS feature flag to DPU INTF block. Nit: repeating the title, perhaps you can reflow this with the second paragraph? - Marijn > In DPU 7.x and later, DSC/DCE enablement registers have been moved fr

Re: [Freedreno] [RFC] drm/msm/dp: Allow attaching a drm_panel

2023-05-22 Thread Bjorn Andersson
On Fri, Oct 08, 2021 at 03:38:21PM +0300, Heikki Krogerus wrote: > Hi, > > On Thu, Oct 07, 2021 at 09:15:12AM -0700, Bjorn Andersson wrote: > > The one thing that I still don't understand though is, if the typec_mux > > is used by the typec controller to inform _the_ mux about the function > > to

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Konrad Dybcio
On 22.05.2023 22:44, Marijn Suijten wrote: > On 2023-05-22 13:30:20, Jessica Zhang wrote: >> Currently, when compression is enabled, hdisplay is reduced via integer >> division. This causes issues for modes where the original hdisplay is >> not a multiple of 3. >> >> To fix this, use DIV_ROUND_U

Re: [Freedreno] [PATCH v4 4/5] drm/msm/dpu: Set DATA_COMPRESS for command mode

2023-05-22 Thread Marijn Suijten
How about: Enable INTF DATA_COMPRESS bit (on cmdmode) for DCE/DSC 1.2? Drop parenthesis at your convenience. On 2023-05-22 13:30:23, Jessica Zhang wrote: > Add a DPU INTF op to set DATA_COMPRESS register if the > DPU_INTF_DATA_COMPRESS feature is enabled. This bit needs to be set in > order for D

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Marijn Suijten
On 2023-05-22 22:52:40, Konrad Dybcio wrote: > > > On 22.05.2023 22:44, Marijn Suijten wrote: > > On 2023-05-22 13:30:20, Jessica Zhang wrote: > >> Currently, when compression is enabled, hdisplay is reduced via integer > >> division. This causes issues for modes where the original hdisplay is >

Re: [Freedreno] [PATCH v4 5/5] drm/msm/dsi: Remove incorrect references to slice_count

2023-05-22 Thread Marijn Suijten
On 2023-05-22 13:30:24, Jessica Zhang wrote: > Currently, slice_count is being used to calculate word count and > pkt_per_line. Instead, these values should be calculated using slice per > packet, which is not the same as slice_count. > > Slice count represents the number of soft slices per interf

Re: [Freedreno] [PATCH v4 5/5] drm/msm/dsi: Remove incorrect references to slice_count

2023-05-22 Thread Marijn Suijten
One more suggestion: DSC slice_count* On 2023-05-22 13:30:24, Jessica Zhan - Marijn

Re: [Freedreno] [PATCH v12 01/10] drm/msm/dpu: set DSC flush bit correctly at MDP CTL flush register

2023-05-22 Thread Marijn Suijten
On 2023-05-22 23:18:02, Dmitry Baryshkov wrote: > On 22/05/2023 22:30, Kuogee Hsieh wrote: > > DSC flush bit is the bit 22 of CTL flush register. BIT(22) is expected > > to be written to CTL flush register to indicates that DSC is ready for > > flush. However 0x22 (BIT(1) and BIT(5)) was written mi

Re: [Freedreno] [PATCH v12 1/9] drm/display/dsc: Add flatness and initial scale value calculations

2023-05-22 Thread Jessica Zhang
On 5/22/2023 2:37 AM, Jani Nikula wrote: On Wed, 17 May 2023, Jessica Zhang wrote: Add helpers to calculate det_thresh_flatness and initial_scale_value as these calculations are defined within the DSC spec. Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- include/drm/display

Re: [Freedreno] [PATCH v12 3/9] drm/display/dsc: Add drm_dsc_get_bpp_int helper

2023-05-22 Thread Jessica Zhang
On 5/22/2023 2:35 AM, Jani Nikula wrote: On Wed, 17 May 2023, Jessica Zhang wrote: Add helper to get the integer value of drm_dsc_config.bits_per_pixel Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- include/drm/display/drm_dsc_helper.h | 7 +++ 1 file changed, 7 inser

Re: [Freedreno] [PATCH v12 07/10] drm/msm/dpu: always clear every individual pending flush mask

2023-05-22 Thread Marijn Suijten
On 2023-05-22 12:30:50, Kuogee Hsieh wrote: > There are two tiers of pending flush control, main controller and > individual hardware block. Currently only the main controller of I would call "main controller" "top level" instead, but not sure how the hardware manual calls this? > flush mask is r

Re: [Freedreno] [PATCH v4 4/5] drm/msm/dpu: Set DATA_COMPRESS for command mode

2023-05-22 Thread Jessica Zhang
On 5/22/2023 1:54 PM, Marijn Suijten wrote: How about: Enable INTF DATA_COMPRESS bit (on cmdmode) for DCE/DSC 1.2? Hi Marijn, Acked. Drop parenthesis at your convenience. On 2023-05-22 13:30:23, Jessica Zhang wrote: Add a DPU INTF op to set DATA_COMPRESS register if the DPU_INTF_DATA_C

Re: [Freedreno] [PATCH v4 5/5] drm/msm/dsi: Remove incorrect references to slice_count

2023-05-22 Thread Jessica Zhang
On 5/22/2023 2:01 PM, Marijn Suijten wrote: On 2023-05-22 13:30:24, Jessica Zhang wrote: Currently, slice_count is being used to calculate word count and pkt_per_line. Instead, these values should be calculated using slice per packet, which is not the same as slice_count. Slice count represe

Re: [Freedreno] [PATCH v4 2/5] drm/msm/dsi: Adjust pclk rate for compression

2023-05-22 Thread Marijn Suijten
On 2023-05-22 13:30:21, Jessica Zhang wrote: > Adjust the pclk rate to divide hdisplay by the compression ratio when DSC > is enabled. > > Signed-off-by: Jessica Zhang As discussed previously, this patch would apply a lot more cleanly on top of: https://lore.kernel.org/linux-arm-msm/20230520200

[Freedreno] [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Kuogee Hsieh
The internal_hpd flag is set to true by dp_bridge_hpd_enable() and set to false by dp_bridge_hpd_disable() to handle GPIO pinmuxed into DP controller case. HDP related interrupts can not be enabled until internal_hpd is set to true. At current implementation dp_display_config_hpd() will initialize

Re: [Freedreno] [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Dmitry Baryshkov
On Tue, 23 May 2023 at 00:31, Kuogee Hsieh wrote: > > The internal_hpd flag is set to true by dp_bridge_hpd_enable() and set to > false by dp_bridge_hpd_disable() to handle GPIO pinmuxed into DP controller > case. HDP related interrupts can not be enabled until internal_hpd is set > to true. At cu

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Jessica Zhang
On 5/22/2023 1:44 PM, Marijn Suijten wrote: On 2023-05-22 13:30:20, Jessica Zhang wrote: Currently, when compression is enabled, hdisplay is reduced via integer division. This causes issues for modes where the original hdisplay is not a multiple of 3. To fix this, use DIV_ROUND_UP to divide

[Freedreno] [PATCH v2 0/6] drm/msm/dpu: rework interrupt handling

2023-05-22 Thread Dmitry Baryshkov
Declaring the mask of supported interrupts proved to be error-prone. It is very easy to add a bit with no corresponding backing block or to miss the INTF TE bit. Replace this static configuration with the irq mask calculated from the HW catalog data. Changes since v1: - Enable dpu_caps::has_7xxx_

[Freedreno] [PATCH v2 2/6] drm/msm/dpu: inline __intr_offset

2023-05-22 Thread Dmitry Baryshkov
Inline __intr_offset(), there is no point in having a separate oneline function for setting base block address. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --

[Freedreno] [PATCH v2 4/6] drm/msm/dpu: autodetect supported interrupts

2023-05-22 Thread Dmitry Baryshkov
Declaring the mask of supported interrupts proved to be error-prone. It is very easy to add a bit with no corresponding backing block or to miss the INTF TE bit. Replace this with looping over the enabled INTF blocks to setup the irq mask. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp

[Freedreno] [PATCH v2 1/6] drm/msm/dpu: don't set DPU_INTF_TE globally

2023-05-22 Thread Dmitry Baryshkov
Using BIT(DPU_INTF_TE) in INTF_SC7180_MASK (and by extension in INTF_SC7280_MASK) results in this bit (and corrsponding operations) being enabled for all interfaces, even the ones which do not have TE block. Move this bit setting to INTF_DSI_TE(), so that it is only enabled for those INTF blocks wh

[Freedreno] [PATCH v2 6/6] drm/msm/dpu: drop compatibility INTR defines

2023-05-22 Thread Dmitry Baryshkov
While reworking interrupts masks, it was easier to keep old MDP_INTFn_7xxx_INTR and MDP_INTFn_7xxx_TEAR_INTR symbols. Now it is time to drop them and use unified symbol names. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h |

[Freedreno] [PATCH v2 5/6] drm/msm/dpu: drop now-unused mdss_irqs field from hw catalog

2023-05-22 Thread Dmitry Baryshkov
Now as the list of the interrupts is constructed from the catalog data, drop the mdss_irqs field from catalog. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h| 8 .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h |

[Freedreno] [PATCH v2 3/6] drm/msm/dpu: split interrupt address arrays

2023-05-22 Thread Dmitry Baryshkov
There is no point in having a single enum (and a single array) for both DPU < 7.0 and DPU >= 7.0 interrupt registers. Instead define a single enum and two IRQ address arrays. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h| 1 + .../msm/disp/dpu1/catalog/dpu_7

Re: [Freedreno] [RFC] drm/msm/dp: Allow attaching a drm_panel

2023-05-22 Thread Bjorn Andersson
On Mon, May 22, 2023 at 03:51:01PM -0500, Bjorn Andersson wrote: > On Fri, Oct 08, 2021 at 03:38:21PM +0300, Heikki Krogerus wrote: > > Hi, > > > > On Thu, Oct 07, 2021 at 09:15:12AM -0700, Bjorn Andersson wrote: > > > The one thing that I still don't understand though is, if the typec_mux > > > i

Re: [Freedreno] [PATCH v2 1/6] drm/msm/dpu: don't set DPU_INTF_TE globally

2023-05-22 Thread Marijn Suijten
Title suggestion: s/globally/on non-TE/DSI (INTF) blocks On 2023-05-23 00:45:22, Dmitry Baryshkov wrote: > Using BIT(DPU_INTF_TE) in INTF_SC7180_MASK (and by extension in > INTF_SC7280_MASK) results in this bit (and corrsponding operations) > being enabled for all interfaces, even the ones which d

Re: [Freedreno] [PATCH v2 2/6] drm/msm/dpu: inline __intr_offset

2023-05-22 Thread Marijn Suijten
On 2023-05-23 00:45:23, Dmitry Baryshkov wrote: > Inline __intr_offset(), there is no point in having a separate oneline > function for setting base block address. > > Reviewed-by: Neil Armstrong > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/d

Re: [Freedreno] [PATCH v2 1/6] drm/msm/dpu: don't set DPU_INTF_TE globally

2023-05-22 Thread Dmitry Baryshkov
On 23/05/2023 00:56, Marijn Suijten wrote: Title suggestion: s/globally/on non-TE/DSI (INTF) blocks On 2023-05-23 00:45:22, Dmitry Baryshkov wrote: Using BIT(DPU_INTF_TE) in INTF_SC7180_MASK (and by extension in INTF_SC7280_MASK) results in this bit (and corrsponding operations) being enabled f

Re: [Freedreno] [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Bjorn Andersson
On Mon, May 22, 2023 at 02:31:32PM -0700, Kuogee Hsieh wrote: > The internal_hpd flag is set to true by dp_bridge_hpd_enable() and set to > false by dp_bridge_hpd_disable() to handle GPIO pinmuxed into DP controller > case. HDP related interrupts can not be enabled until internal_hpd is set > to tr

Re: [Freedreno] [PATCH v4 3/5] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag

2023-05-22 Thread Jessica Zhang
On 5/22/2023 1:47 PM, Marijn Suijten wrote: Can you fit DPU >= 7.0 in the title? Hi Marijn, Sure. On 2023-05-22 13:30:22, Jessica Zhang wrote: Add DATA_COMPRESS feature flag to DPU INTF block. Nit: repeating the title, perhaps you can reflow this with the second paragraph? Acked. T

Re: [Freedreno] [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Dmitry Baryshkov
On 23/05/2023 01:05, Bjorn Andersson wrote: On Mon, May 22, 2023 at 02:31:32PM -0700, Kuogee Hsieh wrote: The internal_hpd flag is set to true by dp_bridge_hpd_enable() and set to false by dp_bridge_hpd_disable() to handle GPIO pinmuxed into DP controller case. HDP related interrupts can not be

Re: [Freedreno] [PATCH v2 3/6] drm/msm/dpu: split interrupt address arrays

2023-05-22 Thread Marijn Suijten
... for 7xxx? On 2023-05-23 00:45:24, Dmitry Baryshkov wrote: > There is no point in having a single enum (and a single array) for both > DPU < 7.0 and DPU >= 7.0 interrupt registers. Instead define a single > enum and two IRQ address arrays. > > Signed-off-by: Dmitry Baryshkov Really like this

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Jessica Zhang
On 5/22/2023 2:45 PM, Jessica Zhang wrote: On 5/22/2023 1:44 PM, Marijn Suijten wrote: On 2023-05-22 13:30:20, Jessica Zhang wrote: Currently, when compression is enabled, hdisplay is reduced via integer division. This causes issues for modes where the original hdisplay is not a multiple o

Re: [Freedreno] [PATCH v2 4/6] drm/msm/dpu: autodetect supported interrupts

2023-05-22 Thread Marijn Suijten
On 2023-05-23 00:45:25, Dmitry Baryshkov wrote: > Declaring the mask of supported interrupts proved to be error-prone. It > is very easy to add a bit with no corresponding backing block or to miss > the INTF TE bit. Replace this with looping over the enabled INTF blocks > to setup the irq mask. >

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Dmitry Baryshkov
On Tue, 23 May 2023 at 00:45, Jessica Zhang wrote: > > > > On 5/22/2023 1:44 PM, Marijn Suijten wrote: > > On 2023-05-22 13:30:20, Jessica Zhang wrote: > >> Currently, when compression is enabled, hdisplay is reduced via integer > >> division. This causes issues for modes where the original hdispl

Re: [Freedreno] [PATCH v2 5/6] drm/msm/dpu: drop now-unused mdss_irqs field from hw catalog

2023-05-22 Thread Marijn Suijten
On 2023-05-23 00:45:26, Dmitry Baryshkov wrote: > Now as the list of the interrupts is constructed from the catalog > data, drop the mdss_irqs field from catalog. > > Reviewed-by: Neil Armstrong > Signed-off-by: Dmitry Baryshkov > --- > .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h| 8 --

Re: [Freedreno] [PATCH v2 4/6] drm/msm/dpu: autodetect supported interrupts

2023-05-22 Thread Dmitry Baryshkov
On Tue, 23 May 2023 at 01:12, Marijn Suijten wrote: > > On 2023-05-23 00:45:25, Dmitry Baryshkov wrote: > > Declaring the mask of supported interrupts proved to be error-prone. It > > is very easy to add a bit with no corresponding backing block or to miss > > the INTF TE bit. Replace this with lo

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Marijn Suijten
On 2023-05-23 01:14:40, Dmitry Baryshkov wrote: > On Tue, 23 May 2023 at 00:45, Jessica Zhang wrote: > > > > > > > > On 5/22/2023 1:44 PM, Marijn Suijten wrote: > > > On 2023-05-22 13:30:20, Jessica Zhang wrote: > > >> Currently, when compression is enabled, hdisplay is reduced via integer > > >>

Re: [Freedreno] [PATCH v2 5/6] drm/msm/dpu: drop now-unused mdss_irqs field from hw catalog

2023-05-22 Thread Dmitry Baryshkov
On Tue, 23 May 2023 at 01:15, Marijn Suijten wrote: > > On 2023-05-23 00:45:26, Dmitry Baryshkov wrote: > > Now as the list of the interrupts is constructed from the catalog > > data, drop the mdss_irqs field from catalog. > > > > Reviewed-by: Neil Armstrong > > Signed-off-by: Dmitry Baryshkov >

Re: [Freedreno] [PATCH v2 4/6] drm/msm/dpu: autodetect supported interrupts

2023-05-22 Thread Marijn Suijten
On 2023-05-23 01:17:50, Dmitry Baryshkov wrote: > On Tue, 23 May 2023 at 01:12, Marijn Suijten > wrote: > > > > On 2023-05-23 00:45:25, Dmitry Baryshkov wrote: > > > Declaring the mask of supported interrupts proved to be error-prone. It > > > is very easy to add a bit with no corresponding backin

Re: [Freedreno] [PATCH v2 6/6] drm/msm/dpu: drop compatibility INTR defines

2023-05-22 Thread Marijn Suijten
On 2023-05-23 00:45:27, Dmitry Baryshkov wrote: > While reworking interrupts masks, it was easier to keep old > MDP_INTFn_7xxx_INTR and MDP_INTFn_7xxx_TEAR_INTR symbols. Now it is time > to drop them and use unified symbol names. > > Reviewed-by: Neil Armstrong > Signed-off-by: Dmitry Baryshkov

Re: [Freedreno] [RFC PATCH v2 06/13] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2023-05-22 Thread Abhinav Kumar
Sorry for the delay, other topics delayed my response on this one. On 5/18/2023 6:50 PM, Dmitry Baryshkov wrote: On 19/05/2023 02:46, Abhinav Kumar wrote: On 3/20/2023 6:18 PM, Dmitry Baryshkov wrote: Up to now the driver has been using encoder to allocate hardware resources. Switch it to us

Re: [Freedreno] [PATCH v4 1/5] msm/drm/dsi: Round up DSC hdisplay calculation

2023-05-22 Thread Dmitry Baryshkov
On 23/05/2023 01:18, Marijn Suijten wrote: On 2023-05-23 01:14:40, Dmitry Baryshkov wrote: On Tue, 23 May 2023 at 00:45, Jessica Zhang wrote: On 5/22/2023 1:44 PM, Marijn Suijten wrote: On 2023-05-22 13:30:20, Jessica Zhang wrote: Currently, when compression is enabled, hdisplay is reduce

Re: [Freedreno] [PATCH v2 1/6] drm/msm/dpu: don't set DPU_INTF_TE globally

2023-05-22 Thread Marijn Suijten
On 2023-05-23 01:01:50, Dmitry Baryshkov wrote: > On 23/05/2023 00:56, Marijn Suijten wrote: > > Title suggestion: s/globally/on non-TE/DSI (INTF) blocks > > > > On 2023-05-23 00:45:22, Dmitry Baryshkov wrote: > >> Using BIT(DPU_INTF_TE) in INTF_SC7180_MASK (and by extension in > >> INTF_SC7280_MA

Re: [Freedreno] [PATCH v4 2/5] drm/msm/dsi: Adjust pclk rate for compression

2023-05-22 Thread Jessica Zhang
On 5/22/2023 2:31 PM, Marijn Suijten wrote: On 2023-05-22 13:30:21, Jessica Zhang wrote: Adjust the pclk rate to divide hdisplay by the compression ratio when DSC is enabled. Signed-off-by: Jessica Zhang As discussed previously, this patch would apply a lot more cleanly on top of: https:

Re: [Freedreno] [PATCH v2 1/2] drm/msm/dsi: remove extra call to dsi_get_pclk_rate()

2023-05-22 Thread Jessica Zhang
On 5/20/2023 1:01 PM, Dmitry Baryshkov wrote: In dsi_calc_clk_rate_v2() there is no need to call dsi_get_pclk_rate(). This function has just been called (from dsi_calc_pclk()) and its result is stored at msm_host->pixel_clk_rate. Use this variable directly. Hi Dmitry, LGTM. Reviewed-by: Je

Re: [Freedreno] [PATCH v2 2/7] drm/msm/dpu: separate common function to init physical encoder

2023-05-22 Thread Abhinav Kumar
On 5/18/2023 7:38 PM, Dmitry Baryshkov wrote: Move common DPU physical encoder initialization code to the new function dpu_encoder_phys_init(). Signed-off-by: Dmitry Baryshkov --- Reviewed-by: Abhinav Kumar

Re: [Freedreno] [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

2023-05-22 Thread Kuogee Hsieh
  -static void dp_display_config_hpd(struct dp_display_private *dp) -{ - -    dp_display_host_init(dp); -    dp_catalog_ctrl_hpd_config(dp->catalog); - -    /* Enable plug and unplug interrupts only if requested */ -    if (dp->dp_display.internal_hpd) -    dp_catalog_hpd_config_intr(dp->c

Re: [Freedreno] [PATCH v2 6/7] drm/msm/dpu: drop temp variable from dpu_encoder_phys_cmd_init()

2023-05-22 Thread Abhinav Kumar
On 5/18/2023 7:38 PM, Dmitry Baryshkov wrote: There is no need to assign a result to temp varable just to return it two lines below. Drop the temporary variable. Signed-off-by: Dmitry Baryshkov --- Reviewed-by: Abhinav Kumar

  1   2   >