Re: [Freedreno] [RFT PATCH v2 3/3] drm/msm/dsi: More properly handle errors in regards to dsi_mgr_bridge_power_on()

2023-02-27 Thread Dmitry Baryshkov
On 01/02/2023 00:18, Douglas Anderson wrote: In commit 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset time") the error handling with regards to dsi_mgr_bridge_power_on() got a bit worse. Specifically if we failed to power the bridge on then nothing would really notice. The modeset

Re: [Freedreno] [RFT PATCH v2 2/3] drm/msm/dsi: Stop unconditionally powering up DSI hosts at modeset

2023-02-27 Thread Dmitry Baryshkov
On 01/02/2023 00:18, Douglas Anderson wrote: In commit 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset time"), we moved powering up DSI hosts to modeset time. This wasn't because it was an elegant design, but there were no better options. That commit actually ended up breaking

Re: [Freedreno] [RFT PATCH v2 1/3] drm/bridge: tc358762: Set pre_enable_prev_first

2023-02-27 Thread Dmitry Baryshkov
On 01/02/2023 00:18, Douglas Anderson wrote: Set the "pre_enable_prev_first" as provided by commit 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init order"). This should allow us to revert commit ec7981e6c614 ("drm/msm/dsi: don't powerup at modeset time for

Re: [Freedreno] [RFT PATCH v2 1/3] drm/bridge: tc358762: Set pre_enable_prev_first

2023-02-27 Thread Dmitry Baryshkov
On 28/02/2023 02:26, Doug Anderson wrote: Hi, On Wed, Feb 1, 2023 at 1:51 AM Dave Stevenson wrote: On Tue, 31 Jan 2023 at 22:22, Douglas Anderson wrote: Set the "pre_enable_prev_first" as provided by commit 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init

Re: [Freedreno] [RFT PATCH v2 1/3] drm/bridge: tc358762: Set pre_enable_prev_first

2023-02-27 Thread Doug Anderson
Hi, On Wed, Feb 1, 2023 at 1:51 AM Dave Stevenson wrote: > > On Tue, 31 Jan 2023 at 22:22, Douglas Anderson wrote: > > > > Set the "pre_enable_prev_first" as provided by commit 4fb912e5e190 > > ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init > > order"). This should allow us

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

2023-02-27 Thread Rob Clark
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, Rob Clark wrote: > > > > On Fri, Feb 24, 2023 at 7:27 AM Luben Tuikov >

Re: [Freedreno] [RFC PATCH 2/2] drm/msm/dp: enable pm_runtime support for dp driver

2023-02-27 Thread Bjorn Andersson
On Thu, Feb 23, 2023 at 07:26:35PM +0530, Sankeerth Billakanti wrote: > diff --git a/drivers/gpu/drm/msm/dp/dp_aux.c b/drivers/gpu/drm/msm/dp/dp_aux.c [..] > +static int dp_runtime_resume(struct device *dev) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct msm_dp

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

2023-02-27 Thread Sebastian Wick
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, Rob Clark wrote: > > > On Fri, Feb 24, 2023 at 7:27 AM Luben Tuikov wrote: > > > > > > > > On 2023-02-24 06:37, Tvrtko Ursulin wrote: > > >

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

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 1:36 PM Rodrigo Vivi wrote: > > On Fri, Feb 24, 2023 at 09:59:57AM -0800, Rob Clark wrote: > > On Fri, Feb 24, 2023 at 7:27 AM Luben Tuikov wrote: > > > > > > On 2023-02-24 06:37, Tvrtko Ursulin wrote: > > > > > > > > On 24/02/2023 11:00, Pekka Paalanen wrote: > > > >> On

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

2023-02-27 Thread Kuogee Hsieh
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 correct sc7280 ping pong-0 block base offset.

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

2023-02-27 Thread Rodrigo Vivi
On Fri, Feb 24, 2023 at 09:59:57AM -0800, Rob Clark wrote: > On Fri, Feb 24, 2023 at 7:27 AM Luben Tuikov wrote: > > > > On 2023-02-24 06:37, Tvrtko Ursulin wrote: > > > > > > On 24/02/2023 11:00, Pekka Paalanen wrote: > > >> On Fri, 24 Feb 2023 10:50:51 + > > >> Tvrtko Ursulin wrote: > > >>

Re: [Freedreno] [RFC PATCH 1/2] drm/msm/dpu: add dsc helper functions

2023-02-27 Thread Abhinav Kumar
On 2/27/2023 11:25 AM, Dmitry Baryshkov wrote: 27 февраля 2023 г. 19:59:35 GMT+02:00, Abhinav Kumar пишет: On 2/27/2023 4:45 AM, Dmitry Baryshkov wrote: On Mon, 27 Feb 2023 at 01:49, Abhinav Kumar wrote: On 2/26/2023 5:09 AM, Dmitry Baryshkov wrote: On 26/02/2023 02:47, Abhinav

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

2023-02-27 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] drm/msm/dp: check core_initialized flag at both host_init() and host_deinit()

2023-02-27 Thread Abhinav Kumar
Hi Stephen On 2/27/2023 11:53 AM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2023-02-24 10:29:58) There is a reboot/suspend test case where system suspend is forced during system booting up. Since host_init() of external DP is executed at hpd dp_display_host_init()? thread context, this

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

2023-02-27 Thread Stephen Boyd
Quoting Kuogee Hsieh (2023-02-24 10:29:58) > There is a reboot/suspend test case where system suspend is forced during > system booting up. Since host_init() of external DP is executed at hpd dp_display_host_init()? > thread context, this test case may created a scenario that host_deinit()

[Freedreno] [PATCH v7 15/15] drm/i915: Add deadline based boost support

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

[Freedreno] [PATCH v7 14/15] drm/msm/atomic: Switch to vblank_start helper

2023-02-27 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 +---

[Freedreno] [PATCH v7 13/15] drm/msm: Add wait-boost support

2023-02-27 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 v7 11/15] drm/atomic-helper: Set fence deadline for vblank

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

[Freedreno] [PATCH v7 12/15] drm/msm: Add deadline based boost support

2023-02-27 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 +

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

2023-02-27 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 --- drivers/gpu/drm/drm_vblank.c | 53

[Freedreno] [PATCH v7 09/15] drm/syncobj: Add deadline support for syncobj waits

2023-02-27 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 v7 08/15] drm/scheduler: Add fence deadline support

2023-02-27 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 v7 07/15] dma-buf/sw_sync: Add fence deadline support

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

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

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

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

2023-02-27 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:

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

2023-02-27 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 v7 02/15] dma-buf/fence-array: Add fence deadline support

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

[Freedreno] [PATCH v7 03/15] dma-buf/fence-chain: Add fence deadline support

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

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

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

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

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

Re: [Freedreno] [RFC PATCH 1/2] drm/msm/dpu: add dsc helper functions

2023-02-27 Thread Dmitry Baryshkov
27 февраля 2023 г. 19:59:35 GMT+02:00, Abhinav Kumar пишет: > > >On 2/27/2023 4:45 AM, Dmitry Baryshkov wrote: >> On Mon, 27 Feb 2023 at 01:49, Abhinav Kumar >> wrote: >>> >>> >>> >>> On 2/26/2023 5:09 AM, Dmitry Baryshkov wrote: On 26/02/2023 02:47, Abhinav Kumar wrote: > Hi

Re: [Freedreno] [PATCH v1] drm/msm/disp/dpu: fix sc7280_pp base address

2023-02-27 Thread Stephen Boyd
Quoting Kuogee Hsieh (2023-02-27 09:04:31) > Correct sc7280 pp block base address. What goes wrong if this is left unchanged? How important is it to fix this? Does the display fail to work? Does it fix something for a new feature that isn't yet enabled upstream? This information is useful to put

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

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 1:34 AM Pekka Paalanen wrote: > > On Fri, 24 Feb 2023 11:44:53 -0800 > Rob Clark wrote: > > > On Fri, Feb 24, 2023 at 2:24 AM Pekka Paalanen wrote: > > > > > > On Fri, 24 Feb 2023 09:41:46 + > > > Tvrtko Ursulin wrote: > > > > > > > On 24/02/2023 09:26, Pekka

Re: [Freedreno] [RFC PATCH 1/2] drm/msm/dpu: add dsc helper functions

2023-02-27 Thread Abhinav Kumar
On 2/27/2023 4:45 AM, Dmitry Baryshkov wrote: On Mon, 27 Feb 2023 at 01:49, Abhinav Kumar wrote: On 2/26/2023 5:09 AM, Dmitry Baryshkov wrote: On 26/02/2023 02:47, Abhinav Kumar wrote: Hi Dmitry On 2/25/2023 7:23 AM, Dmitry Baryshkov wrote: On 25/02/2023 02:36, Abhinav Kumar wrote:

[Freedreno] [PATCH v1] drm/msm/disp/dpu: fix sc7280_pp base address

2023-02-27 Thread Kuogee Hsieh
Correct sc7280 pp block base address. Fixes: 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target") Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Freedreno] [RFC PATCH 1/2] drm/msm/dpu: add dsc helper functions

2023-02-27 Thread Jani Nikula
On Sun, 26 Feb 2023, Abhinav Kumar wrote: > On 2/26/2023 5:09 AM, Dmitry Baryshkov wrote: >> On 26/02/2023 02:47, Abhinav Kumar wrote: >>> Hi Dmitry >>> >>> On 2/25/2023 7:23 AM, Dmitry Baryshkov wrote: On 25/02/2023 02:36, Abhinav Kumar wrote: > > > On 2/24/2023 3:53 PM, Dmitry

Re: [Freedreno] [RFC PATCH 1/2] drm/msm/dpu: add dsc helper functions

2023-02-27 Thread Dmitry Baryshkov
On Mon, 27 Feb 2023 at 01:49, Abhinav Kumar wrote: > > > > On 2/26/2023 5:09 AM, Dmitry Baryshkov wrote: > > On 26/02/2023 02:47, Abhinav Kumar wrote: > >> Hi Dmitry > >> > >> On 2/25/2023 7:23 AM, Dmitry Baryshkov wrote: > >>> On 25/02/2023 02:36, Abhinav Kumar wrote: > > > On

Re: [Freedreno] [RFC PATCH 1/2] drm/msm/dpu: add dsc helper functions

2023-02-27 Thread Dmitry Baryshkov
On Mon, 27 Feb 2023 at 02:15, Abhinav Kumar wrote: > > > > On 2/26/2023 5:13 AM, Dmitry Baryshkov wrote: > > On 26/02/2023 02:16, Abhinav Kumar wrote: > >> Hi Dmitry > >> > >> On 2/24/2023 3:57 PM, Dmitry Baryshkov wrote: > >>> On Sat, 25 Feb 2023 at 01:51, Kuogee Hsieh > >>> wrote: > >

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

2023-02-27 Thread Konrad Dybcio
On 24.02.2023 17:56, Chris Healy wrote: > I may be missing something, but looking at the code path for a2xx, > it's not clear to me how this would work with SoCs with a2xx that > don't support 200MHz for GPU frequency. For example, the NXP i.MX51 > requires the A205 GPU to run at 166MHz while

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

2023-02-27 Thread Pekka Paalanen
On Fri, 24 Feb 2023 11:44:53 -0800 Rob Clark wrote: > On Fri, Feb 24, 2023 at 2:24 AM Pekka Paalanen wrote: > > > > On Fri, 24 Feb 2023 09:41:46 + > > Tvrtko Ursulin wrote: > > > > > On 24/02/2023 09:26, Pekka Paalanen wrote: > > > > On Thu, 23 Feb 2023 10:51:48 -0800 > > > > Rob Clark

Re: [Freedreno] [PATCH AUTOSEL 6.1 18/58] drm/msm/dp: Remove INIT_SETUP delay

2023-02-27 Thread Johan Hovold
On Sun, Feb 26, 2023 at 09:04:16PM -0500, Sasha Levin wrote: > From: Bjorn Andersson > > [ Upstream commit e17af1c9d861dc177e5b56009bd4f71ace688d97 ] > > During initalization of the DisplayPort controller an EV_HPD_INIT_SETUP > event is generated, but with a delay of 100 units. This delay

Re: [Freedreno] [PATCH AUTOSEL 6.2 18/60] drm/msm/dp: Remove INIT_SETUP delay

2023-02-27 Thread Johan Hovold
On Sun, Feb 26, 2023 at 09:00:03PM -0500, Sasha Levin wrote: > From: Bjorn Andersson > > [ Upstream commit e17af1c9d861dc177e5b56009bd4f71ace688d97 ] > > During initalization of the DisplayPort controller an EV_HPD_INIT_SETUP > event is generated, but with a delay of 100 units. This delay