Re: [Freedreno] [PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-03 Thread Dmitry Baryshkov
On 04/04/2023 00:38, Jessica Zhang wrote: On 4/2/2023 4:21 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp

Re: [Freedreno] [PATCH v3 00/38] drm/msm/dpu: rework HW catalog

2023-04-03 Thread Dmitry Baryshkov
On 03/04/2023 22:07, Abhinav Kumar wrote: On 4/3/2023 11:48 AM, Dmitry Baryshkov wrote: On 03/04/2023 21:06, Abhinav Kumar wrote: On 3/30/2023 2:52 PM, Dmitry Baryshkov wrote: This huge series attempts to restructure the DPU HW catalog into a manageable and reviewable data set. In order to

Re: [Freedreno] [PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-03 Thread Jessica Zhang
On 4/3/2023 2:51 PM, Dmitry Baryshkov wrote: On 04/04/2023 00:45, Jessica Zhang wrote: On 4/2/2023 4:27 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("d

Re: [Freedreno] [PATCH v3 01/38] drm/msm/dpu: Allow variable SSPP/INTF_BLK size

2023-04-03 Thread Abhinav Kumar
On 4/1/2023 2:37 AM, Dmitry Baryshkov wrote: On 01/04/2023 03:57, Abhinav Kumar wrote: On 3/30/2023 2:52 PM, Dmitry Baryshkov wrote: From: Konrad Dybcio These blocks are of variable length on different SoCs. Set the correct values where I was able to retrieve it from downstream DTs and l

Re: [Freedreno] [PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-03 Thread Dmitry Baryshkov
On 04/04/2023 00:45, Jessica Zhang wrote: On 4/2/2023 4:27 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-of

Re: [Freedreno] [PATCH RFC v2 5/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-03 Thread Jessica Zhang
On 4/2/2023 4:29 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in V2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separate patch

Re: [Freedreno] [PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-03 Thread Jessica Zhang
On 4/2/2023 4:27 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry B

Re: [Freedreno] [PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-03 Thread Jessica Zhang
On 4/2/2023 4:21 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to c

Re: [Freedreno] [PATCH v3 00/38] drm/msm/dpu: rework HW catalog

2023-04-03 Thread Abhinav Kumar
On 4/3/2023 11:48 AM, Dmitry Baryshkov wrote: On 03/04/2023 21:06, Abhinav Kumar wrote: On 3/30/2023 2:52 PM, Dmitry Baryshkov wrote: This huge series attempts to restructure the DPU HW catalog into a manageable and reviewable data set. In order to ease review and testing I merged all the

Re: [Freedreno] [PATCH v3 00/38] drm/msm/dpu: rework HW catalog

2023-04-03 Thread Dmitry Baryshkov
On 03/04/2023 21:06, Abhinav Kumar wrote: On 3/30/2023 2:52 PM, Dmitry Baryshkov wrote: This huge series attempts to restructure the DPU HW catalog into a manageable and reviewable data set. In order to ease review and testing I merged all the necessary fixes into this series. Also I cherry-pi

Re: [Freedreno] [PATCH v3 00/38] drm/msm/dpu: rework HW catalog

2023-04-03 Thread Abhinav Kumar
On 3/30/2023 2:52 PM, Dmitry Baryshkov wrote: This huge series attempts to restructure the DPU HW catalog into a manageable and reviewable data set. In order to ease review and testing I merged all the necessary fixes into this series. Also I cherry-picked & slightly fixed Konrad's patch addin

Re: [Freedreno] [PATCH v1 1/3] drm/msm/dpu: set dirty_fb flag while in self refresh mode

2023-04-03 Thread Dmitry Baryshkov
On 31/03/2023 17:45, Dmitry Baryshkov wrote: On Fri, 31 Mar 2023 at 16:59, Vinod Polimera wrote: While in virtual terminal mode with PSR enabled, there will be no atomic commits triggered without dirty_fb being set. This will create a notion of no screen update. Allow atomic commit when dirty_

Re: [Freedreno] [PATCH v1 3/3] msm: skip the atomic commit of self refresh while PSR running

2023-04-03 Thread Dmitry Baryshkov
On Mon, 3 Apr 2023 at 15:01, Vinod Polimera wrote: > > > On Fri, 31 Mar 2023 at 16:59, Vinod Polimera > > wrote: > > > > > > In certain CPU stress conditions, there can be a delay in scheduling > > > commit > > > work and it was observed that PSR commit from a different work queue > > was > > >

Re: [Freedreno] [v2,1/8] drm/msm: Include

2023-04-03 Thread Sui Jingfeng
Reviewed-by:  Sui Jingfeng On 2023/4/3 20:45, Thomas Zimmermann wrote: Include to get the declaration of devm_ioremap() on sparc64. No functional changes. Signed-off-by: Thomas Zimmermann Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303301856.zsmpwzjj-...

Re: [Freedreno] [PATCH v1 3/3] msm: skip the atomic commit of self refresh while PSR running

2023-04-03 Thread Dmitry Baryshkov
On 31/03/2023 16:58, Vinod Polimera wrote: In certain CPU stress conditions, there can be a delay in scheduling commit work and it was observed that PSR commit from a different work queue was scheduled. Avoid these commits as display is already in PSR mode. Signed-off-by: Vinod Polimera --- d

Re: [Freedreno] [PATCH v1 1/3] drm/msm/dpu: set dirty_fb flag while in self refresh mode

2023-04-03 Thread Vinod Polimera
> On Fri, 31 Mar 2023 at 16:59, Vinod Polimera > wrote: > > > > While in virtual terminal mode with PSR enabled, there will be > > no atomic commits triggered without dirty_fb being set. This > > will create a notion of no screen update. Allow atomic commit > > when dirty_fb ioctl is issued, so th

[Freedreno] [PATCH v2 5/8] drm/msm: Remove fbdev from struct msm_drm_private

2023-04-03 Thread Thomas Zimmermann
The DRM device stores a pointer to the fbdev helper. Remove struct msm_drm_private.fbdev, which contains the same value. No functional changes. v2: * test for fb_helper->fb in debugfs code Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_debugf

[Freedreno] [PATCH v2 1/8] drm/msm: Include

2023-04-03 Thread Thomas Zimmermann
Include to get the declaration of devm_ioremap() on sparc64. No functional changes. Signed-off-by: Thomas Zimmermann Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303301856.zsmpwzjj-...@intel.com/ --- drivers/gpu/drm/msm/msm_io_utils.c | 1 + 1 file changed, 1 i

[Freedreno] [PATCH v2 7/8] drm/msm: Initialize fbdev DRM client

2023-04-03 Thread Thomas Zimmermann
Initialize the fbdev client in the fbdev code with empty helper functions. Also clean up the client. The helpers will later implement various functionality of the DRM client. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_fbdev.

[Freedreno] [PATCH v2 8/8] drm/msm: Implement fbdev emulation as in-kernel client

2023-04-03 Thread Thomas Zimmermann
Move code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform t

[Freedreno] [PATCH v2 4/8] drm/msm: Remove struct msm_fbdev

2023-04-03 Thread Thomas Zimmermann
Remove struct msm_fbdev, which is an empty wrapper around struct drm_fb_helper. Use the latter directly. No functional changes. v2: * kfree fbdev helper instance on init errors (Dmitri) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/msm/msm_fbdev.c | 20 1 fil

[Freedreno] [PATCH v2 6/8] drm/msm: Move module parameter 'fbdev' to fbdev code

2023-04-03 Thread Thomas Zimmermann
Define the module's parameter 'fbdev' in fbdev code. No other code uses it. No functional changes, but simplifies the later conversion to struct drm_client. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/msm/msm_drv.c | 10 ++ drivers/gpu/drm/msm/msm_fbdev.c | 7 +++ 2 files

[Freedreno] [PATCH v2 2/8] drm/msm: Clear aperture ownership outside of fbdev code

2023-04-03 Thread Thomas Zimmermann
Move aperture management out of the fbdev code. It is unrelated and needs to run even if fbdev support has been disabled. Call the helper at the top of msm_drm_init() to take over hardware from other drivers. v2: * bind all subdevices before acquiring device (Dmitri) Signed-off-by: Thomas

[Freedreno] [PATCH v2 3/8] drm/msm: Remove fb from struct msm_fbdev

2023-04-03 Thread Thomas Zimmermann
Fbdev's struct fb_helper stores a pointer to the framebuffer. Remove struct msm_fbdev.fb, which contains thre same value. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_fbdev.c | 32 +--- 1 file chang

[Freedreno] [PATCH v2 0/8] drm/msm: Convert fbdev to DRM client

2023-04-03 Thread Thomas Zimmermann
Convert msm' fbdev code to struct drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation, fbdev in msm is now just another DRM client that runs after the DRM device has been registered. Once all drivers' fbdev

Re: [Freedreno] [PATCH v1 3/3] msm: skip the atomic commit of self refresh while PSR running

2023-04-03 Thread Vinod Polimera
> On Fri, 31 Mar 2023 at 16:59, Vinod Polimera > wrote: > > > > In certain CPU stress conditions, there can be a delay in scheduling commit > > work and it was observed that PSR commit from a different work queue > was > > scheduled. Avoid these commits as display is already in PSR mode. > > > > S

Re: [Freedreno] [PATCH 1/6] drm/msm: Clear aperture ownership outside of fbdev code

2023-04-03 Thread Thomas Zimmermann
Hi Am 30.03.23 um 11:51 schrieb Dmitry Baryshkov: On Thu, 30 Mar 2023 at 10:41, Thomas Zimmermann wrote: Move aperture management out of the fbdev code. It is unrelated and needs to run even if fbdev support has been disabled. Call the helper at the top of msm_drm_init() to take over hardware

[Freedreno] [PATCH v4 11/12] drm/i915/dsc: use additional DSC helpers

2023-04-03 Thread Dmitry Baryshkov
Switch to drm_dsc_set_const_params() to set some semi-constant parameters. The rc_model_size, which is set beforehand, is preserved by the helper. Also make use of drm_dsc_set_initial_scale_value(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/display/intel_vdsc.c | 15 ++

[Freedreno] [PATCH v4 10/12] drm/display/dsc: Add flatness and initial scale value calculations

2023-04-03 Thread Dmitry Baryshkov
From: Jessica Zhang Add helpers to calculate det_thresh_flatness and initial_scale_value as these calculations are defined within the DSC spec. Changes in v2: - Renamed det_thresh_flatness to flatness_det_thresh - Set initial_scale_value directly in helper Signed-off-by: Jessica Zhang Signed-o

[Freedreno] [PATCH v4 12/12] drm/i915/dsc: make use of several params from drm_dsc_config

2023-04-03 Thread Dmitry Baryshkov
The code was ignoring (up to some point for rc_model_size) the rc_model_size, rc_tgt_offset_high, rc_tgt_offset_low and rc_edge_factor parameters from struct drm_dsc_config. Actually use them instead of resorting to predefined constants. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/d

[Freedreno] [PATCH v4 06/12] drm/display/dsc: split DSC 1.2 and DSC 1.1 (pre-SCR) parameters

2023-04-03 Thread Dmitry Baryshkov
The array of rc_parameters contains a mixture of parameters from DSC 1.1 and DSC 1.2 standards. Split these tow configuration arrays in preparation to adding more configuration data. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 127 ++ drive

[Freedreno] [PATCH v4 04/12] drm/i915/dsc: stop using interim structure for calculated params

2023-04-03 Thread Dmitry Baryshkov
Stop using an interim structure rc_parameters for storing calculated params and then setting drm_dsc_config using that structure. Instead put calculated params into the struct drm_dsc_config directly. Reviewed-by: Jani Nikula Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/display/inte

[Freedreno] [PATCH v4 08/12] drm/display/dsc: add YCbCr 4:2:2 and 4:2:0 RC parameters

2023-04-03 Thread Dmitry Baryshkov
Include RC parameters for YCbCr 4:2:2 and 4:2:0 configurations. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 438 +++ include/drm/display/drm_dsc_helper.h | 2 + 2 files changed, 440 insertions(+) diff --git a/drivers/gpu/drm/display/d

[Freedreno] [PATCH v4 09/12] drm/display/dsc: add helper to set semi-const parameters

2023-04-03 Thread Dmitry Baryshkov
Add a helper setting config values which are typically constant across operating modes (table E-4 of the standard) and mux_word_size (which is a const according to 3.5.2). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 22 ++ include/drm/displa

[Freedreno] [PATCH v4 03/12] drm/i915/dsc: move DSC tables to DRM DSC helper

2023-04-03 Thread Dmitry Baryshkov
Move DSC RC tables to DRM DSC helper. No additional code changes and/or cleanups are a part of this commit, it will be cleaned up in the followup commits. Reviewed-by: Jani Nikula Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 372 ++ drivers

[Freedreno] [PATCH v4 05/12] drm/display/dsc: use flat array for rc_parameters lookup

2023-04-03 Thread Dmitry Baryshkov
Next commits are going to add support for additional RC parameter lookup tables. These tables are going to use different bpp/bpc combinations, thus it makes little sense to keep the 2d array for RC parameters. Switch to using the flat array. Reviewed-by: Jani Nikula Signed-off-by: Dmitry Baryshko

[Freedreno] [PATCH v4 02/12] drm/i915/dsc: move rc_buf_thresh values to common helper

2023-04-03 Thread Dmitry Baryshkov
The rc_buf_thresh values are common to all DSC implementations. Move them to the common helper together with the code to propagage them to the drm_dsc_config. Reviewed-by: Jani Nikula Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 35 +++ dri

[Freedreno] [PATCH v4 07/12] drm/display/dsc: include the rest of pre-SCR parameters

2023-04-03 Thread Dmitry Baryshkov
DSC model contains pre-SCR RC parameters for other bpp/bpc combinations, include them here for completeness. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 72 1 file changed, 72 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dsc_

[Freedreno] [PATCH v4 00/12] drm/i915: move DSC RC tables to drm_dsc_helper.c

2023-04-03 Thread Dmitry Baryshkov
Other platforms (msm) will benefit from sharing the DSC config setup functions. This series moves parts of static DSC config data from the i915 driver to the common helpers to be used by other drivers. Note: the RC parameters were cross-checked against config files found in DSC model 2021062, 2016

[Freedreno] [PATCH v4 01/12] drm/i915/dsc: change DSC param tables to follow the DSC model

2023-04-03 Thread Dmitry Baryshkov
After cross-checking DSC models (20150914, 20161212, 20210623) change values in rc_parameters tables to follow config files present inside the DSC model. Handle two places, where i915 tables diverged from the model, by patching the rc values in the code. Note: I left one case uncorrected, 8bpp/10b

Re: [Freedreno] [PATCH v8 07/10] drm/i915/hdcp: Use HDCP helpers for i915

2023-04-03 Thread Kandpal, Suraj
> -Original Message- > From: Mark Yacoub > Sent: Saturday, April 1, 2023 3:42 AM > To: Jani Nikula ; Joonas Lahtinen > ; Vivi, Rodrigo ; > Tvrtko Ursulin ; David Airlie > ; Daniel Vetter > Cc: seanp...@chromium.org; Kandpal, Suraj ; > diand...@chromium.org; dri-de...@lists.freedesktop.