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

2023-02-22 Thread Pekka Paalanen
On Tue, 21 Feb 2023 09:53:56 -0800 Rob Clark wrote: > On Tue, Feb 21, 2023 at 8:48 AM Luben Tuikov wrote: > > > > On 2023-02-20 11:14, Rob Clark wrote: > > > On Mon, Feb 20, 2023 at 12:53 AM Pekka Paalanen > > > wrote: > > >> > > >> On Sat, 18 Feb 2023 13:15:49 -0800 > > >> Rob Clark wrot

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

2023-02-22 Thread Pekka Paalanen
On Tue, 21 Feb 2023 09:50:20 -0800 Rob Clark wrote: > On Tue, Feb 21, 2023 at 5:01 AM Ville Syrjälä > wrote: > > > > On Tue, Feb 21, 2023 at 10:45:51AM +0200, Pekka Paalanen wrote: > > > On Mon, 20 Feb 2023 07:55:41 -0800 > > > Rob Clark wrote: > > > > > > > On Mon, Feb 20, 2023 at 1:08 AM

Re: [Freedreno] [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj waits

2023-02-22 Thread Pekka Paalanen
On Tue, 21 Feb 2023 09:25:18 -0800 Rob Clark wrote: > On Tue, Feb 21, 2023 at 12:53 AM Pekka Paalanen wrote: > > > > On Mon, 20 Feb 2023 12:18:56 -0800 > > Rob Clark wrote: > > > > > From: Rob Clark > > > > > > Add a new flag to let userspace provide a deadline as a hint for syncobj > > > an

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Tvrtko Ursulin
On 18/02/2023 21:15, 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 frequency as the deadl

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

2023-02-22 Thread Luben Tuikov
On 2023-02-22 04:49, Pekka Paalanen wrote: > On Tue, 21 Feb 2023 09:53:56 -0800 > Rob Clark wrote: > >> On Tue, Feb 21, 2023 at 8:48 AM Luben Tuikov wrote: >>> >>> On 2023-02-20 11:14, Rob Clark wrote: On Mon, Feb 20, 2023 at 12:53 AM Pekka Paalanen wrote: > > On Sat, 18

Re: [Freedreno] [PATCH v4 03/14] dma-buf/fence-chain: Add fence deadline support

2023-02-22 Thread Tvrtko Ursulin
On 18/02/2023 21:15, Rob Clark wrote: From: Rob Clark Propagate the deadline to all the fences in the chain. Signed-off-by: Rob Clark Reviewed-by: Christian König for this one. --- drivers/dma-buf/dma-fence-chain.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drive

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

2023-02-22 Thread Luben Tuikov
On 2023-02-18 16:15, 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. > > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/drm_vblank.c | 32 > include/drm/drm_vblank.h

Re: [Freedreno] [PATCH v4 11/14] drm/atomic-helper: Set fence deadline for vblank

2023-02-22 Thread Luben Tuikov
On 2023-02-18 16:15, Rob Clark wrote: > 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 > Si

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Luben Tuikov
On 2023-02-18 16:15, 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 > frequency as t

Re: [Freedreno] [RFC] drm/msm/adreno: Balance pm_runtime enable

2023-02-22 Thread Johan Hovold
On Fri, Feb 10, 2023 at 08:10:00AM -0800, Rob Clark wrote: > On Fri, Feb 3, 2023 at 10:12 AM Bjorn Andersson > wrote: > > > > When any of the components in the mdss hierarchy fails to bind, > > previously bound components are being unbound again. > > > > One such case happens when the DP controlle

[Freedreno] [PATCH] drm/msm: Fix possible uninitialized access in fbdev

2023-02-22 Thread Thomas Zimmermann
Do not run drm_fb_helper_unprepare() if fbdev allocation fails. Avoids access to an uninitialized pointer. Original bug report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini

Re: [Freedreno] [PATCH] drm/msm: Fix possible uninitialized access in fbdev

2023-02-22 Thread Dmitry Baryshkov
On 22/02/2023 14:37, Thomas Zimmermann wrote: Do not run drm_fb_helper_unprepare() if fbdev allocation fails. Avoids access to an uninitialized pointer. Original bug report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove dr

Re: [Freedreno] [PATCH] drm/msm: Fix possible uninitialized access in fbdev

2023-02-22 Thread Thomas Zimmermann
Hi Am 22.02.23 um 13:37 schrieb Dmitry Baryshkov: On 22/02/2023 14:37, Thomas Zimmermann wrote: Do not run drm_fb_helper_unprepare() if fbdev allocation fails. Avoids access to an uninitialized pointer. Original bug report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmer

Re: [Freedreno] [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj waits

2023-02-22 Thread Rodrigo Vivi
On Wed, Feb 22, 2023 at 12:09:04PM +0200, Pekka Paalanen wrote: > On Tue, 21 Feb 2023 09:25:18 -0800 > Rob Clark wrote: > > > On Tue, Feb 21, 2023 at 12:53 AM Pekka Paalanen wrote: > > > > > > On Mon, 20 Feb 2023 12:18:56 -0800 > > > Rob Clark wrote: > > > > > > > From: Rob Clark > > > > > >

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Christian König
Am 22.02.23 um 11:23 schrieb Tvrtko Ursulin: On 18/02/2023 21:15, 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 de

Re: [Freedreno] [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj waits

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 6:06 AM Rodrigo Vivi wrote: > > On Wed, Feb 22, 2023 at 12:09:04PM +0200, Pekka Paalanen wrote: > > On Tue, 21 Feb 2023 09:25:18 -0800 > > Rob Clark wrote: > > > > > On Tue, Feb 21, 2023 at 12:53 AM Pekka Paalanen > > > wrote: > > > > > > > > On Mon, 20 Feb 2023 12:18:56

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

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 1:49 AM Pekka Paalanen wrote: > > On Tue, 21 Feb 2023 09:53:56 -0800 > Rob Clark wrote: > > > On Tue, Feb 21, 2023 at 8:48 AM Luben Tuikov wrote: > > > > > > On 2023-02-20 11:14, Rob Clark wrote: > > > > On Mon, Feb 20, 2023 at 12:53 AM Pekka Paalanen > > > > wrote: > >

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

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 1:57 AM Pekka Paalanen wrote: > > On Tue, 21 Feb 2023 09:50:20 -0800 > Rob Clark wrote: > > > On Tue, Feb 21, 2023 at 5:01 AM Ville Syrjälä > > wrote: > > > > > > On Tue, Feb 21, 2023 at 10:45:51AM +0200, Pekka Paalanen wrote: > > > > On Mon, 20 Feb 2023 07:55:41 -0800 >

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

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 2:37 AM Luben Tuikov wrote: > > On 2023-02-18 16:15, 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. > > > > Signed-off-by: Rob Clark > > --- > > drivers/gpu/drm/drm_vblank.

Re: [Freedreno] [PATCH v4 11/14] drm/atomic-helper: Set fence deadline for vblank

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 2:46 AM Luben Tuikov wrote: > > On 2023-02-18 16:15, Rob Clark wrote: > > 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

Re: [Freedreno] [PATCH v4 03/14] dma-buf/fence-chain: Add fence deadline support

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 2:27 AM Tvrtko Ursulin wrote: > > > On 18/02/2023 21:15, Rob Clark wrote: > > From: Rob Clark > > > > Propagate the deadline to all the fences in the chain. > > > > Signed-off-by: Rob Clark > > Reviewed-by: Christian König for this one. > > --- > > drivers/dma-buf/dma-

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

2023-02-22 Thread Ville Syrjälä
On Wed, Feb 22, 2023 at 07:44:42AM -0800, Rob Clark wrote: > On Wed, Feb 22, 2023 at 1:57 AM Pekka Paalanen wrote: > > > > On Tue, 21 Feb 2023 09:50:20 -0800 > > Rob Clark wrote: > > > > > On Tue, Feb 21, 2023 at 5:01 AM Ville Syrjälä > > > wrote: > > > > > > > > On Tue, Feb 21, 2023 at 10:45:51

[Freedreno] [PATCH] drm/msm: return early when allocating fbdev fails

2023-02-22 Thread Tom Rix
building with clang and W=1 reports drivers/gpu/drm/msm/msm_fbdev.c:144:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!fbdev) ^~ helper is only initialized after fbdev succeeds, so is in a garbage state at t

Re: [Freedreno] [PATCH] drm/msm: return early when allocating fbdev fails

2023-02-22 Thread Thomas Zimmermann
Hi Am 22.02.23 um 16:56 schrieb Tom Rix: building with clang and W=1 reports drivers/gpu/drm/msm/msm_fbdev.c:144:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!fbdev) ^~ helper is only initialized afte

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Tvrtko Ursulin
On 22/02/2023 15:28, Christian König wrote: Am 22.02.23 um 11:23 schrieb Tvrtko Ursulin: On 18/02/2023 21:15, 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 t

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 9:05 AM Tvrtko Ursulin wrote: > > > On 22/02/2023 15:28, Christian König wrote: > > Am 22.02.23 um 11:23 schrieb Tvrtko Ursulin: > >> > >> On 18/02/2023 21:15, Rob Clark wrote: > >>> From: Rob Clark > >>> > >>> Add a way to hint to the fence signaler of an upcoming deadlin

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Tvrtko Ursulin
On 22/02/2023 17:16, Rob Clark wrote: On Wed, Feb 22, 2023 at 9:05 AM Tvrtko Ursulin wrote: On 22/02/2023 15:28, Christian König wrote: Am 22.02.23 um 11:23 schrieb Tvrtko Ursulin: On 18/02/2023 21:15, Rob Clark wrote: From: Rob Clark Add a way to hint to the fence signaler of an upco

Re: [Freedreno] [PATCH 1/2] drm/msm: drop unused ring variable in msm_ioctl_gem_submit()

2023-02-22 Thread Rob Clark
On Fri, Feb 17, 2023 at 5:25 PM Dmitry Baryshkov wrote: > > The variable ring is not used by msm_parse_deps() and > msm_ioctl_gem_submit() and thus can be dropped. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/msm_gem_submit.c | 10 +++--- > drivers/gpu/drm/msm/msm_gpu_trac

Re: [Freedreno] [PATCH] drm/msm: return early when allocating fbdev fails

2023-02-22 Thread Nathan Chancellor
On Wed, Feb 22, 2023 at 05:09:40PM +0100, Thomas Zimmermann wrote: > Hi > > Am 22.02.23 um 16:56 schrieb Tom Rix: > > building with clang and W=1 reports > > drivers/gpu/drm/msm/msm_fbdev.c:144:6: error: variable 'helper' is used > >uninitialized whenever 'if' condition is true > > [-Werror,-

Re: [Freedreno] [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 9:33 AM Tvrtko Ursulin wrote: > > > On 22/02/2023 17:16, Rob Clark wrote: > > On Wed, Feb 22, 2023 at 9:05 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 22/02/2023 15:28, Christian König wrote: > >>> Am 22.02.23 um 11:23 schrieb Tvrtko Ursulin: > > On 18/02/2023

Re: [Freedreno] [PATCH 3/4] drm/msm/adreno: drop redundant pm_runtime_disable()

2023-02-22 Thread Rob Clark
On Tue, Feb 21, 2023 at 2:16 AM Johan Hovold wrote: > > Since commit 4b18299b3365 ("drm/msm/adreno: Defer enabling runpm until > hw_init()") runtime PM is no longer enabled at adreno_gpu_init(), which > means that there are no longer any bind() error paths for which > adreno_gpu_cleanup() is calle

[Freedreno] [PATCH 0/5] OPP and devfreq for all Adrenos

2023-02-22 Thread Konrad Dybcio
iles changed, 99 insertions(+), 55 deletions(-) --- base-commit: f4ed0868966d96203fee6f2782508746ded2ce3f change-id: 20230222-konrad-longbois-next-86d1a69532c2 Best regards, -- Konrad Dybcio

[Freedreno] [PATCH 3/5] drm/msm/a3xx: Implement .gpu_busy

2023-02-22 Thread Konrad Dybcio
Add support for gpu_busy on a3xx, which is required for devfreq support. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c index 94

[Freedreno] [PATCH 2/5] drm/msm/a2xx: Implement .gpu_busy

2023-02-22 Thread Konrad Dybcio
Implement gpu_busy based on the downstream msm-3.4 code [1]. This allows us to use devfreq on this old old old hardware! [1] https://github.com/LineageOS/android_kernel_sony_apq8064/blob/lineage-16.0/drivers/gpu/msm/adreno_a2xx.c#L1975 Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adren

[Freedreno] [PATCH 5/5] drm/msm/a5xx: Enable optional icc voting from OPP tables

2023-02-22 Thread Konrad Dybcio
Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/g

[Freedreno] [PATCH 1/5] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Konrad Dybcio
Some older GPUs (namely a2xx with no opp tables at all and a320 with downstream-remnants gpu pwrlevels) used not to have OPP tables. They both however had just one frequency defined, making it extremely easy to construct such an OPP table from within the driver if need be. Do so and switch all clk

[Freedreno] [PATCH 4/5] drm/msm/a4xx: Implement .gpu_busy

2023-02-22 Thread Konrad Dybcio
Add support for gpu_busy on a4xx, which is required for devfreq support. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c index 3e

Re: [Freedreno] [PATCH 3/5] drm/msm/a3xx: Implement .gpu_busy

2023-02-22 Thread Dmitry Baryshkov
On 22/02/2023 23:47, Konrad Dybcio wrote: Add support for gpu_busy on a3xx, which is required for devfreq support. Signed-off-by: Konrad Dybcio Tested-by: Dmitry Baryshkov #ifc6410 Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry

Re: [Freedreno] [PATCH 5/5] drm/msm/a5xx: Enable optional icc voting from OPP tables

2023-02-22 Thread Dmitry Baryshkov
On 22/02/2023 23:47, Konrad Dybcio wrote: Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. This can probably go to the generic code path rather than sticking it into a5xx only. Signed-off-by: Konrad Dybcio --- drivers

Re: [Freedreno] [PATCH 5/5] drm/msm/a5xx: Enable optional icc voting from OPP tables

2023-02-22 Thread Konrad Dybcio
On 22.02.2023 23:12, Dmitry Baryshkov wrote: > On 22/02/2023 23:47, Konrad Dybcio wrote: >> Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework >> handle bus voting as part of power level setting. > > This can probably go to the generic code path rather than sticking it into >

Re: [Freedreno] [PATCH 5/5] drm/msm/a5xx: Enable optional icc voting from OPP tables

2023-02-22 Thread Dmitry Baryshkov
On 23/02/2023 00:14, Konrad Dybcio wrote: On 22.02.2023 23:12, Dmitry Baryshkov wrote: On 22/02/2023 23:47, Konrad Dybcio wrote: Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. This can probably go to the generic code pa

Re: [Freedreno] [PATCH 4/5] drm/msm/a4xx: Implement .gpu_busy

2023-02-22 Thread Dmitry Baryshkov
On 22/02/2023 23:47, Konrad Dybcio wrote: Add support for gpu_busy on a4xx, which is required for devfreq support. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 11 +++ 1 file changed, 11 insertions(+) Reviewed-by: Dmitry Baryshkov -- With best wishes D

Re: [Freedreno] [PATCH 2/5] drm/msm/a2xx: Implement .gpu_busy

2023-02-22 Thread Dmitry Baryshkov
On 22/02/2023 23:47, Konrad Dybcio wrote: Implement gpu_busy based on the downstream msm-3.4 code [1]. This allows us to use devfreq on this old old old hardware! [1] https://github.com/LineageOS/android_kernel_sony_apq8064/blob/lineage-16.0/drivers/gpu/msm/adreno_a2xx.c#L1975 Signed-off-by: K

Re: [Freedreno] [PATCH 1/5] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Dmitry Baryshkov
On 22/02/2023 23:47, Konrad Dybcio wrote: Some older GPUs (namely a2xx with no opp tables at all and a320 with downstream-remnants gpu pwrlevels) used not to have OPP tables. They both however had just one frequency defined, making it extremely easy to construct such an OPP table from within the

Re: [Freedreno] [PATCH 1/5] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Konrad Dybcio
On 22.02.2023 23:38, Dmitry Baryshkov wrote: > On 22/02/2023 23:47, Konrad Dybcio wrote: >> Some older GPUs (namely a2xx with no opp tables at all and a320 with >> downstream-remnants gpu pwrlevels) used not to have OPP tables. They >> both however had just one frequency defined, making it extre

Re: [Freedreno] [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2023-02-22 Thread Rob Clark
On Thu, Feb 16, 2023 at 3:12 AM Daniel Vetter wrote: > > The stuff never really worked, and leads to lots of fun because it > out-of-order frees atomic states. Which upsets KASAN, among other > things. > > For async updates we now have a more solid solution with the > ->atomic_async_check and ->at

Re: [Freedreno] [PATCH 1/5] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Dmitry Baryshkov
On 23/02/2023 00:40, Konrad Dybcio wrote: On 22.02.2023 23:38, Dmitry Baryshkov wrote: On 22/02/2023 23:47, Konrad Dybcio wrote: Some older GPUs (namely a2xx with no opp tables at all and a320 with downstream-remnants gpu pwrlevels) used not to have OPP tables. They both however had just one

Re: [Freedreno] [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2023-02-22 Thread Rob Clark
On Wed, Feb 22, 2023 at 3:14 PM Rob Clark wrote: > > On Thu, Feb 16, 2023 at 3:12 AM Daniel Vetter wrote: > > > > The stuff never really worked, and leads to lots of fun because it > > out-of-order frees atomic states. Which upsets KASAN, among other > > things. > > > > For async updates we now h

Re: [Freedreno] [PATCH 1/5] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Konrad Dybcio
On 23.02.2023 00:16, Dmitry Baryshkov wrote: > On 23/02/2023 00:40, Konrad Dybcio wrote: >> >> >> On 22.02.2023 23:38, Dmitry Baryshkov wrote: >>> On 22/02/2023 23:47, Konrad Dybcio wrote: Some older GPUs (namely a2xx with no opp tables at all and a320 with downstream-remnants gpu pwrl

[Freedreno] [PATCH v2 1/6] drm/msm/a2xx: Include perf counter reg values in XML

2023-02-22 Thread Konrad Dybcio
This is a partial merge of [1], subject to be dropped if a header update is executed. [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21480/ Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a2xx.xml.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu

[Freedreno] [PATCH v2 0/6] OPP and devfreq for all Adrenos

2023-02-22 Thread Konrad Dybcio
v1 -> v2: - Move a2xx #defines to XML - Use dev_pm_opp_find_freq_floor in the common path in [2/6] - Clarify a comment in [2/6] - Move voting from a5xx to Adreno-wide [6/6] - Pick up tags v1: https://lore.kernel.org/linux-arm-msm/20230222-konrad-longbois-next-v1-0-010214257...@linaro.org T

[Freedreno] [PATCH v2 2/6] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Konrad Dybcio
Some older GPUs (namely a2xx with no opp tables at all and a320 with downstream-remnants gpu pwrlevels) used not to have OPP tables. They both however had just one frequency defined, making it extremely easy to construct such an OPP table from within the driver if need be. Do so and switch all clk

[Freedreno] [PATCH v2 5/6] drm/msm/a4xx: Implement .gpu_busy

2023-02-22 Thread Konrad Dybcio
Add support for gpu_busy on a4xx, which is required for devfreq support. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c b/drivers/gpu/drm

[Freedreno] [PATCH v2 3/6] drm/msm/a2xx: Implement .gpu_busy

2023-02-22 Thread Konrad Dybcio
Implement gpu_busy based on the downstream msm-3.4 code [1]. This allows us to use devfreq on this old old old hardware! [1] https://github.com/LineageOS/android_kernel_sony_apq8064/blob/lineage-16.0/drivers/gpu/msm/adreno_a2xx.c#L1975 Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adren

[Freedreno] [PATCH v2 4/6] drm/msm/a3xx: Implement .gpu_busy

2023-02-22 Thread Konrad Dybcio
Add support for gpu_busy on a3xx, which is required for devfreq support. Tested-by: Dmitry Baryshkov #ifc6410 Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/ms

[Freedreno] [PATCH v2 6/6] drm/msm/adreno: Enable optional icc voting from OPP tables

2023-02-22 Thread Konrad Dybcio
Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/adreno_device.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b

Re: [Freedreno] [PATCH v2 2/6] drm/msm/adreno: Use OPP for every GPU generation

2023-02-22 Thread Dmitry Baryshkov
On Thu, 23 Feb 2023 at 03:47, Konrad Dybcio wrote: > > Some older GPUs (namely a2xx with no opp tables at all and a320 with > downstream-remnants gpu pwrlevels) used not to have OPP tables. They > both however had just one frequency defined, making it extremely easy > to construct such an OPP tabl

Re: [Freedreno] [PATCH v2 3/6] drm/msm/a2xx: Implement .gpu_busy

2023-02-22 Thread Dmitry Baryshkov
On Thu, 23 Feb 2023 at 03:47, Konrad Dybcio wrote: > > Implement gpu_busy based on the downstream msm-3.4 code [1]. This > allows us to use devfreq on this old old old hardware! > > [1] > https://github.com/LineageOS/android_kernel_sony_apq8064/blob/lineage-16.0/drivers/gpu/msm/adreno_a2xx.c#L197

Re: [Freedreno] [PATCH v2 6/6] drm/msm/adreno: Enable optional icc voting from OPP tables

2023-02-22 Thread Dmitry Baryshkov
On Thu, 23 Feb 2023 at 03:47, Konrad Dybcio wrote: > > Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework > handle bus voting as part of power level setting. > > Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry