Re: [Freedreno] [PATCH v7 01/15] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:07 -0800 Rob Clark wrote: > From: Rob Clark > > Add a way to hint to the fence signaler of an upcoming deadline, such as > vblank, which the fence waiter would prefer not to miss. This is to aid > the fence signaler in making power management decisions, like boosting

Re: [Freedreno] [PATCH v7 05/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:11 -0800 Rob Clark wrote: > From: Rob Clark > > The initial purpose is for igt tests, but this would also be useful for > compositors that wait until close to vblank deadline to make decisions > about which frame to show. > > The igt tests can be found at: > > https:

Re: [Freedreno] [PATCH v7 06/15] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:12 -0800 Rob Clark wrote: > From: Rob Clark > > Allow userspace to use the EPOLLPRI/POLLPRI flag to indicate an urgent > wait (as opposed to a "housekeeping" wait to know when to cleanup after > some work has completed). Usermode components of GPU driver stacks > ofte

Re: [Freedreno] [PATCH v7 07/15] dma-buf/sw_sync: Add fence deadline support

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:13 -0800 Rob Clark wrote: > From: Rob Clark > > This consists of simply storing the most recent deadline, and adding an > ioctl to retrieve the deadline. This can be used in conjunction with > the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various > sw_

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

2023-02-28 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 01/10] drm/i915/dsc: change DSC param tables to follow the DSC model

2023-02-28 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

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

2023-02-28 Thread Dmitry Baryshkov
This moves 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 364 ++ drivers/gpu/drm/i915/displa

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

2023-02-28 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 37 +++ drivers/gpu/drm/i915/display/

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

2023-02-28 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 09/10] drm/display/dsc: add helper to set semi-const parameters

2023-02-28 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 | 21 + include/drm/display

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

2023-02-28 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/display/intel_vdsc.c | 89 +---

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

2023-02-28 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 05/10] drm/display/dsc: use flat array for rc_parameters lookup

2023-02-28 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/di

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

2023-02-28 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 10/10] drm/msm/dsi: use new helpers for DSC setup

2023-02-28 Thread Dmitry Baryshkov
Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 61 -- 1 file changed, 8 insertions(

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > 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. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/display/drm_dsc_helper.c

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

2023-02-28 Thread Dmitry Baryshkov
On Tue, 28 Feb 2023 at 14:25, Jani Nikula wrote: > > On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > > 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. > > > > Signed-off-by: Dmitr

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > On Tue, 28 Feb 2023 at 14:25, Jani Nikula wrote: >> >> On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: >> > 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

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

2023-02-28 Thread Dmitry Baryshkov
On 28/02/2023 14:49, Jani Nikula wrote: On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: On Tue, 28 Feb 2023 at 14:25, Jani Nikula wrote: On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: The rc_buf_thresh values are common to all DSC implementations. Move them to the common helper together with th

Re: [Freedreno] [PATCH v7 00/15] dma-fence: Deadline awareness

2023-02-28 Thread Bagas Sanjaya
On Mon, Feb 27, 2023 at 11:35:06AM -0800, Rob Clark wrote: > From: Rob Clark > > This series adds a deadline hint to fences, so realtime deadlines > such as vblank can be communicated to the fence signaller for power/ > frequency management decisions. > > This is partially inspired by a trick i9

Re: [Freedreno] [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Sebastian Wick
On Tue, Feb 28, 2023 at 12:48 AM Rob Clark wrote: > > On Mon, Feb 27, 2023 at 2:44 PM Sebastian Wick > wrote: > > > > On Mon, Feb 27, 2023 at 11:20 PM Rob Clark wrote: > > > > > > On Mon, Feb 27, 2023 at 1:36 PM Rodrigo Vivi > > > wrote: > > > > > > > > On Fri, Feb 24, 2023 at 09:59:57AM -0800

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

2023-02-28 Thread kernel test robot
Hi Dmitry, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm/drm-next linus/master v6.2 next-20230228] [If your patch is applied to the wrong git tree

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

2023-02-28 Thread kernel test robot
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/Dmitry-Baryshkov/drm-i915-dsc-change-DSC-param-tables-to-follow-the-DSC-model/20230228-193505 b

Re: [Freedreno] [PATCH v7 00/15] dma-fence: Deadline awareness

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 4:43 AM Bagas Sanjaya wrote: > > On Mon, Feb 27, 2023 at 11:35:06AM -0800, Rob Clark wrote: > > From: Rob Clark > > > > This series adds a deadline hint to fences, so realtime deadlines > > such as vblank can be communicated to the fence signaller for power/ > > frequency

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > 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

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > 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. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/display/drm_dsc_helper.c

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

2023-02-28 Thread Dmitry Baryshkov
On 28/02/2023 17:56, Jani Nikula wrote: On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: 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 m

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > This moves 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. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/display/drm_dsc_helper.c

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > 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. > > Signed-off-by: Dmitry Baryshkov > --- >

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > 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. > >

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > DSC model contains pre-SCR RC parameters for other bpp/bpc combinations, > include them here for completeness. Need to run now, note to self: Does i915 use the arrays to limit the bpp/bpc combos supported by hardware? Do we need to add separate limi

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

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > 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/di

Re: [Freedreno] [PATCH v7 01/15] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 1:21 AM Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 11:35:07 -0800 > Rob Clark wrote: > > > From: Rob Clark > > > > Add a way to hint to the fence signaler of an upcoming deadline, such as > > vblank, which the fence waiter would prefer not to miss. This is to aid > >

Re: [Freedreno] [PATCH v2] drm/msm/disp/dpu: fix sc7280_pp base offset

2023-02-28 Thread Abhinav Kumar
On 2/27/2023 1:36 PM, Kuogee Hsieh wrote: At sc7280, pingpong block is used to management the dither effects to reduce distortion at panel. Currently pingpong-0 base offset is wrongly set at 0x59000. This mistake will not cause system to crash. However it will make dither not work. This patch

Re: [Freedreno] [PATCH v2] drm/msm/disp/dpu: fix sc7280_pp base offset

2023-02-28 Thread Dmitry Baryshkov
On 27/02/2023 23:36, Kuogee Hsieh wrote: At sc7280, pingpong block is used to management the dither effects to reduce distortion at panel. Currently pingpong-0 base offset is wrongly set at 0x59000. This mistake will not cause system to crash. However it will make dither not work. This patch corr

Re: [Freedreno] [PATCH v7 05/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 1:22 AM Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 11:35:11 -0800 > Rob Clark wrote: > > > From: Rob Clark > > > > The initial purpose is for igt tests, but this would also be useful for > > compositors that wait until close to vblank deadline to make decisions > > abo

Re: [Freedreno] [PATCH v7 07/15] dma-buf/sw_sync: Add fence deadline support

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 1:23 AM Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 11:35:13 -0800 > Rob Clark wrote: > > > From: Rob Clark > > > > This consists of simply storing the most recent deadline, and adding an > > ioctl to retrieve the deadline. This can be used in conjunction with > > the

Re: [Freedreno] [PATCH v3 04/15] drm/msm/a6xx: Extend and explain UBWC config

2023-02-28 Thread Akhil P Oommen
On 2/23/2023 5:36 PM, Konrad Dybcio wrote: > Rename lower_bit to hbb_lo and explain what it signifies. > Add explanations (wherever possible to other tunables). > > Sort the variable definition and assignment alphabetically. Sorting based on decreasing order of line length is more readable, isn't i

Re: [Freedreno] [PATCH v3 04/15] drm/msm/a6xx: Extend and explain UBWC config

2023-02-28 Thread Konrad Dybcio
On 28.02.2023 21:23, Akhil P Oommen wrote: > On 2/23/2023 5:36 PM, Konrad Dybcio wrote: >> Rename lower_bit to hbb_lo and explain what it signifies. >> Add explanations (wherever possible to other tunables). >> >> Sort the variable definition and assignment alphabetically. > Sorting based on dec

Re: [Freedreno] [PATCH v3 04/15] drm/msm/a6xx: Extend and explain UBWC config

2023-02-28 Thread Akhil P Oommen
On 3/1/2023 2:10 AM, Konrad Dybcio wrote: > > On 28.02.2023 21:23, Akhil P Oommen wrote: >> On 2/23/2023 5:36 PM, Konrad Dybcio wrote: >>> Rename lower_bit to hbb_lo and explain what it signifies. >>> Add explanations (wherever possible to other tunables). >>> >>> Sort the variable definition and a

Re: [Freedreno] [PATCH v3 04/15] drm/msm/a6xx: Extend and explain UBWC config

2023-02-28 Thread Akhil P Oommen
On 3/1/2023 2:14 AM, Akhil P Oommen wrote: > On 3/1/2023 2:10 AM, Konrad Dybcio wrote: >> On 28.02.2023 21:23, Akhil P Oommen wrote: >>> On 2/23/2023 5:36 PM, Konrad Dybcio wrote: Rename lower_bit to hbb_lo and explain what it signifies. Add explanations (wherever possible to other tunabl

Re: [Freedreno] [PATCH v3 04/15] drm/msm/a6xx: Extend and explain UBWC config

2023-02-28 Thread Konrad Dybcio
On 28.02.2023 21:48, Akhil P Oommen wrote: > On 3/1/2023 2:14 AM, Akhil P Oommen wrote: >> On 3/1/2023 2:10 AM, Konrad Dybcio wrote: >>> On 28.02.2023 21:23, Akhil P Oommen wrote: On 2/23/2023 5:36 PM, Konrad Dybcio wrote: > Rename lower_bit to hbb_lo and explain what it signifies.

Re: [Freedreno] [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 6:30 AM Sebastian Wick wrote: > > On Tue, Feb 28, 2023 at 12:48 AM Rob Clark wrote: > > > > On Mon, Feb 27, 2023 at 2:44 PM Sebastian Wick > > wrote: > > > > > > On Mon, Feb 27, 2023 at 11:20 PM Rob Clark wrote: > > > > > > > > On Mon, Feb 27, 2023 at 1:36 PM Rodrigo Viv

[Freedreno] [PATCH v8 00/16] dma-fence: Deadline awareness

2023-02-28 Thread Rob Clark
From: Rob Clark This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1) To co

[Freedreno] [PATCH v8 01/16] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Rob Clark
From: Rob Clark Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing de

[Freedreno] [PATCH v8 03/16] dma-buf/fence-chain: Add fence deadline support

2023-02-28 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the chain. v2: Use dma_fence_chain_contained [Tvrtko] Signed-off-by: Rob Clark Reviewed-by: Christian König for this one. --- drivers/dma-buf/dma-fence-chain.c | 12 1 file changed, 12 insertions(+) diff --git a/driver

[Freedreno] [PATCH v8 02/16] dma-buf/fence-array: Add fence deadline support

2023-02-28 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-fence-array.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-ar

[Freedreno] [PATCH v8 04/16] dma-buf/dma-resv: Add a way to set fence deadline

2023-02-28 Thread Rob Clark
From: Rob Clark Add a way to set a deadline on remaining resv fences according to the requested usage. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-resv.c | 22 ++ include/linux/dma-resv.h | 2 ++ 2 files changed, 24 insertions(+) diff

[Freedreno] [PATCH v8 05/16] dma-buf/sync_file: Surface sync-file uABI

2023-02-28 Thread Rob Clark
From: Rob Clark We had all of the internal driver APIs, but not the all important userspace uABI, in the dma-buf doc. Fix that. And re-arrange the comments slightly as otherwise the comments for the ioctl nr defines would not show up. Signed-off-by: Rob Clark --- Documentation/driver-api/dma

[Freedreno] [PATCH v8 07/16] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Rob Clark
From: Rob Clark Allow userspace to use the EPOLLPRI/POLLPRI flag to indicate an urgent wait (as opposed to a "housekeeping" wait to know when to cleanup after some work has completed). Usermode components of GPU driver stacks often poll() on fence fd's to know when it is safe to do things like f

[Freedreno] [PATCH v8 09/16] drm/scheduler: Add fence deadline support

2023-02-28 Thread Rob Clark
As the finished fence is the one that is exposed to userspace, and therefore the one that other operations, like atomic update, would block on, we need to propagate the deadline from from the finished fence to the actual hw fence. v2: Split into drm_sched_fence_set_parent() (ckoenig) v3: Ensure a

[Freedreno] [PATCH v8 06/16] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-28 Thread Rob Clark
From: Rob Clark The initial purpose is for igt tests, but this would also be useful for compositors that wait until close to vblank deadline to make decisions about which frame to show. The igt tests can be found at: https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence-deadline

[Freedreno] [PATCH v8 10/16] drm/syncobj: Add deadline support for syncobj waits

2023-02-28 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can be

[Freedreno] [PATCH v8 11/16] drm/vblank: Add helper to get next vblank time

2023-02-28 Thread Rob Clark
From: Rob Clark Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end v3: Fix kbuild complaints Signed-off-by: Rob Clark Reviewed-by: Mario Kleiner --- drivers/gpu/drm/drm_vblank.c | 53 +++

[Freedreno] [PATCH v8 08/16] dma-buf/sw_sync: Add fence deadline support

2023-02-28 Thread Rob Clark
From: Rob Clark This consists of simply storing the most recent deadline, and adding an ioctl to retrieve the deadline. This can be used in conjunction with the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various sw_sync fences, merge them into a fence-array, set deadline on the fe

[Freedreno] [PATCH v8 12/16] drm/atomic-helper: Set fence deadline for vblank

2023-02-28 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_atomic_he

[Freedreno] [PATCH v8 13/16] drm/msm: Add deadline based boost support

2023-02-28 Thread Rob Clark
From: Rob Clark Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 74 + drivers/gpu/drm/msm/

[Freedreno] [PATCH v8 14/16] drm/msm: Add wait-boost support

2023-02-28 Thread Rob Clark
From: Rob Clark Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 12 drivers/gpu/drm/msm/msm_gem.c | 5 + include/uapi/drm/msm_drm.h| 14 -- 3 files changed, 25 insertions(+), 6 deletions(-)

[Freedreno] [PATCH v8 15/16] drm/msm/atomic: Switch to vblank_start helper

2023-02-28 Thread Rob Clark
From: Rob Clark Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 --- drivers/gpu/drm/msm/msm_atomic.c| 8 +--- dr

Re: [Freedreno] [PATCH v7 10/15] drm/vblank: Add helper to get next vblank time

2023-02-28 Thread Mario Kleiner
LGTM. This one is Reviewed-by: Mario Kleiner -mario On Mon, Feb 27, 2023 at 8:36 PM Rob Clark wrote: > From: Rob Clark > > Will be used in the next commit to set a deadline on fences that an > atomic update is waiting on. > > v2: Calculate time at *start* of vblank period, not end > v3: Fix

[Freedreno] [PATCH v8 16/16] drm/i915: Add deadline based boost support

2023-02-28 Thread Rob Clark
From: Rob Clark v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_request.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 7503dcb9043b..44491e7e214c 100644 --- a/drivers

Re: [Freedreno] [PATCH v2 11/50] drm/msm/dpu: drop DPU_DIM_LAYER from MIXER_MSM8998_MASK

2023-02-28 Thread Abhinav Kumar
On 2/11/2023 3:12 PM, Dmitry Baryshkov wrote: The msm8998 doesn't seem to support DIM_LAYER, so drop it from the supported features mask. Fixes: 2d8a4edb672d ("drm/msm/dpu: use feature bit for LM combined alpha check") Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Signed-off

[Freedreno] [PATCH v3] drm/msm/dp: check core_initialized flag at both host_init() and host_deinit()

2023-02-28 Thread Kuogee Hsieh
There is a reboot/suspend test case where system suspend is forced during system booting up. Since dp_display_host_init() of external DP is executed at hpd thread context, this test case may created a scenario that dp_display_host_deinit() from pm_suspend() run before dp_display_host_init() if hpd

Re: [Freedreno] [PATCH v3] drm/msm/dp: check core_initialized flag at both host_init() and host_deinit()

2023-02-28 Thread Dmitry Baryshkov
On Wed, 1 Mar 2023 at 02:17, Kuogee Hsieh wrote: > > There is a reboot/suspend test case where system suspend is forced > during system booting up. Since dp_display_host_init() of external > DP is executed at hpd thread context, this test case may created a > scenario that dp_display_host_deinit()

Re: [Freedreno] [PATCH v7 00/15] dma-fence: Deadline awareness

2023-02-28 Thread Bagas Sanjaya
On 2/28/23 22:44, Rob Clark wrote: > You can find my branch here: > > https://gitlab.freedesktop.org/robclark/msm/-/commits/dma-fence/deadline > Pulled, thanks! -- An old man doll... just what I always wanted! - Clara

Re: [Freedreno] [PATCH v4 1/4] drm/msm/dpu: Move TE setup to prepare_for_kickoff()

2023-02-28 Thread Dmitry Baryshkov
On 21/02/2023 20:42, Jessica Zhang wrote: Currently, DPU will enable TE during prepare_commit(). However, this will cause a crash and reboot to sahara when trying to read/write to register in get_autorefresh_config(), because the core clock rates aren't set at that time. This used to work becaus

Re: [Freedreno] [PATCH v4 3/4] drm/msm/dpu: Remove empty prepare_commit() function

2023-02-28 Thread Dmitry Baryshkov
On 21/02/2023 20:42, Jessica Zhang wrote: Now that the TE setup has been moved to prepare_for_kickoff(), we have not prepare_commit() callbacks left. This makes dpu_encoder_prepare_commit() do nothing. Remove prepare_commit() from DPU driver. Changes in V3: - Reworded commit message to be more

Re: [Freedreno] [PATCH v7 01/15] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Bagas Sanjaya
On Mon, Feb 27, 2023 at 11:35:07AM -0800, Rob Clark wrote: > diff --git a/Documentation/driver-api/dma-buf.rst > b/Documentation/driver-api/dma-buf.rst > index 622b8156d212..183e480d8cea 100644 > --- a/Documentation/driver-api/dma-buf.rst > +++ b/Documentation/driver-api/dma-buf.rst > @@ -164,6 +1