[Freedreno] [PATCH] Remove custom dumb_map_offset implementation in msm driver

2023-11-14 Thread Dipam Turkar
Make msm use drm_gem_create_map_offset() instead of its custom implementation for associating GEM object with a fake offset. Since, we already have this generic implementation, we don't need the custom implementation and it is better to standardize the code for GEM based drivers. Signed-off-by: Di

Re: [Freedreno] [PATCH] Remove custom dumb_map_offset implementation in msm driver

2023-11-14 Thread Dmitry Baryshkov
On Tue, 14 Nov 2023 at 15:28, Dipam Turkar wrote: > > Make msm use drm_gem_create_map_offset() instead of its custom > implementation for associating GEM object with a fake offset. Since, > we already have this generic implementation, we don't need the custom > implementation and it is better to s

[Freedreno] [PATCH 1/4] drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC (fix video mode DSC)

2023-11-14 Thread Jonathan Marek
Video mode DSC won't work if this field is not set correctly. Set it to fix video mode DSC (for slice_per_pkt==1 cases at least). Fixes: 08802f515c3 ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +++ 1 file changed, 3

[Freedreno] [PATCH 2/4] drm/msm/dsi: add a comment to explain pkt_per_line encoding

2023-11-14 Thread Jonathan Marek
Make it clear why the pkt_per_line value is being "divided by 2". Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index bddc57726fb9..2ea2fc105fbf 1

[Freedreno] [PATCH 3/4] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1

2023-11-14 Thread Jonathan Marek
Add a dsc_slice_per_pkt field to mipi_dsi_device struct and the necessary changes to msm driver to support this field. Note that the removed "pkt_per_line = slice_per_intf * slice_per_pkt" comment is incorrect. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++

[Freedreno] [PATCH 4/4] drm/msm/dsi: fix DSC for the bonded DSI case

2023-11-14 Thread Jonathan Marek
For the bonded DSI case, DSC pic_width and timing calculations should use the width of a single panel instead of the total combined width. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi.h | 3 ++- drivers/gpu/drm/msm/dsi/dsi_host.c| 20 +++- drivers/gp

Re: [Freedreno] [PATCH 4/4] drm/msm/dsi: fix DSC for the bonded DSI case

2023-11-14 Thread Marijn Suijten
On what hardware have you been testing this? Dmitry and I have a stack of patches to resolve support for Active CTL programming on newer hardware (DPU 5.0+ IIRC), where a single CTL is responsible for programming multiple INTF and DSC blocks as used in bonded DSI. On 2023-11-14 12:42:16, Jonathan

Re: [Freedreno] [PATCH 4/4] drm/msm/dsi: fix DSC for the bonded DSI case

2023-11-14 Thread Jonathan Marek
On 11/14/23 1:28 PM, Marijn Suijten wrote: On what hardware have you been testing this? Dmitry and I have a stack of patches to resolve support for Active CTL programming on newer hardware (DPU 5.0+ IIRC), where a single CTL is responsible for programming multiple INTF and DSC blocks as used in

[Freedreno] [PATCH v2 0/6] drm/msm: DSI DSC video mode fixes

2023-11-14 Thread Jonathan Marek
v2: added new patches (first two patches) to get DSC video mode running with the upstream DPU driver (tested with the vtdr6130 panel) Jonathan Marek (6): drm/msm/dpu: fix video mode DSC for DSI drm/msm/dsi: set video mode widebus enable bit when widebus is enabled drm/msm/dsi: set VIDEO_COMP

[Freedreno] [PATCH v2 1/6] drm/msm/dpu: fix video mode DSC for DSI

2023-11-14 Thread Jonathan Marek
Add necessary DPU changes for DSC to work with DSI video mode. Note this changes the logic to enable HCTL to match downstream, it will now be enabled for the no-DSC no-widebus case. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- drivers/gpu/drm/ms

[Freedreno] [PATCH v2 2/6] drm/msm/dsi: set video mode widebus enable bit when widebus is enabled

2023-11-14 Thread Jonathan Marek
The value returned by msm_dsi_wide_bus_enabled() doesn't match what the driver is doing in video mode. Fix that by actually enabling widebus for video mode. Fixes: efcbd6f9cdeb ("drm/msm/dsi: Enable widebus for DSI") Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi.xml.h | 1 + dri

[Freedreno] [PATCH v2 3/6] drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC (fix video mode DSC)

2023-11-14 Thread Jonathan Marek
Video mode DSC won't work if this field is not set correctly. Set it to fix video mode DSC (for slice_per_pkt==1 cases at least). Fixes: 08802f515c3 ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +++ 1 file changed, 3

[Freedreno] [PATCH v2 4/6] drm/msm/dsi: add a comment to explain pkt_per_line encoding

2023-11-14 Thread Jonathan Marek
Make it clear why the pkt_per_line value is being "divided by 2". Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 66f198e21a7e..842765063b1b 1

[Freedreno] [PATCH v2 5/6] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1

2023-11-14 Thread Jonathan Marek
Add a dsc_slice_per_pkt field to mipi_dsi_device struct and the necessary changes to msm driver to support this field. Note that the removed "pkt_per_line = slice_per_intf * slice_per_pkt" comment is incorrect. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++

[Freedreno] [PATCH v2 6/6] drm/msm/dsi: fix DSC for the bonded DSI case

2023-11-14 Thread Jonathan Marek
For the bonded DSI case, DSC pic_width and timing calculations should use the width of a single panel instead of the total combined width. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/dsi/dsi.h | 3 ++- drivers/gpu/drm/msm/dsi/dsi_host.c| 20 +++- drivers/gp

Re: [Freedreno] [PATCH v2 2/6] drm/msm/dsi: set video mode widebus enable bit when widebus is enabled

2023-11-14 Thread Dmitry Baryshkov
On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: > > The value returned by msm_dsi_wide_bus_enabled() doesn't match what the > driver is doing in video mode. Fix that by actually enabling widebus for > video mode. > > Fixes: efcbd6f9cdeb ("drm/msm/dsi: Enable widebus for DSI") > Signed-off-by:

Re: [Freedreno] [PATCH v2 2/6] drm/msm/dsi: set video mode widebus enable bit when widebus is enabled

2023-11-14 Thread Dmitry Baryshkov
On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: > > The value returned by msm_dsi_wide_bus_enabled() doesn't match what the > driver is doing in video mode. Fix that by actually enabling widebus for > video mode. > > Fixes: efcbd6f9cdeb ("drm/msm/dsi: Enable widebus for DSI") > Signed-off-by:

Re: [Freedreno] [PATCH v2 3/6] drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC (fix video mode DSC)

2023-11-14 Thread Dmitry Baryshkov
On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: > > Video mode DSC won't work if this field is not set correctly. Set it to fix > video mode DSC (for slice_per_pkt==1 cases at least). > > Fixes: 08802f515c3 ("drm/msm/dsi: Add support for DSC configuration") > Signed-off-by: Jonathan Marek > -

Re: [Freedreno] [PATCH v2 4/6] drm/msm/dsi: add a comment to explain pkt_per_line encoding

2023-11-14 Thread Dmitry Baryshkov
On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: > > Make it clear why the pkt_per_line value is being "divided by 2". > > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c >

Re: [Freedreno] [PATCH v2 5/6] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1

2023-11-14 Thread Dmitry Baryshkov
On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: > > Add a dsc_slice_per_pkt field to mipi_dsi_device struct and the necessary > changes to msm driver to support this field. > > Note that the removed "pkt_per_line = slice_per_intf * slice_per_pkt" > comment is incorrect. > > Signed-off-by: Jona

Re: [Freedreno] [PATCH v2 6/6] drm/msm/dsi: fix DSC for the bonded DSI case

2023-11-14 Thread Dmitry Baryshkov
On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: > > For the bonded DSI case, DSC pic_width and timing calculations should use > the width of a single panel instead of the total combined width. > > Signed-off-by: Jonathan Marek Fixes tag? I'll wait for the Tested-by by Marijn, otherwise LGTM