[Freedreno] [PATCH v4 4/4] drm/vc4: change vc4 driver to use drm_writeback_connector_init_with_encoder()

2022-03-17 Thread Abhinav Kumar
vc4 driver currently embeds the drm_encoder into struct vc4_txp and later on uses container_of to retrieve the vc4_txp from the drm_encoder. Since drm_encoder has now been made a pointer inside drm_writeback_connector, make vc4 driver use the new API so that the embedded encoder model can be retai

[Freedreno] [PATCH v4 3/4] drm: introduce drm_writeback_connector_init_with_encoder() API

2022-03-17 Thread Abhinav Kumar
For vendors drivers which pass an already allocated and initialized encoder especially for cases where the encoder hardware is shared OR the writeback encoder shares the resources with the rest of the display pipeline introduce a new API, drm_writeback_connector_init_with_encoder() which expects an

[Freedreno] [PATCH v4 2/4] drm: allow real encoder to be passed for drm_writeback_connector

2022-03-17 Thread Abhinav Kumar
For some vendor driver implementations, display hardware can be shared between the encoder used for writeback and the physical display. In addition resources such as clocks and interrupts can also be shared between writeback and the real encoder. To accommodate such vendor drivers and hardware, a

[Freedreno] [PATCH v4 1/4] drm: allow passing possible_crtcs to drm_writeback_connector_init()

2022-03-17 Thread Abhinav Kumar
Clients of drm_writeback_connector_init() initialize the possible_crtcs and then invoke the call to this API. To simplify things, allow passing possible_crtcs as a parameter to drm_writeback_connector_init() and make changes to the other drm drivers to make them compatible with this change. chang

[Freedreno] [PATCH v4 0/4] Allow drm_writeback_connector to accept pointer to drm_encoder

2022-03-17 Thread Abhinav Kumar
There are some vendor drivers for which the writeback encoder shares hardware resources such as clocks and interrupts with the rest of the display pipeline. In addition, there can be use-cases where the writeback encoder could be a shared encoder between the physical display path and the writeback

Re: [Freedreno] [PATCH v5 6/9] drm/msm/dp: wait for hpd high before any sink interaction

2022-03-17 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2022-03-16 10:35:51) > The source device should ensure the sink is ready before > proceeding to read the sink capability or performing any aux transactions. > The sink will indicate its readiness by asserting the HPD line. > > The eDP sink requires powe

Re: [Freedreno] [PATCH v5 1/9] arm64: dts: qcom: sc7280: rename edp_out label to mdss_edp_out

2022-03-17 Thread Doug Anderson
Hi, On Wed, Mar 16, 2022 at 10:36 AM Sankeerth Billakanti wrote: > > Rename the edp_out label in the sc7280 platform to mdss_edp_out > so that the nodes related to mdss are all grouped together in > the board specific files. > > Signed-off-by: Sankeerth Billakanti > --- > > Changes in v5: > -

Re: [Freedreno] [PATCH v6 5/5] arm64: dts: qcom: sm8250: remove assigned-clock-rate property for mdp clk

2022-03-17 Thread Doug Anderson
Hi, On Mon, Mar 14, 2022 at 7:47 AM Vinod Polimera wrote: > > Drop the assigned clock rate property and vote on the mdp clock as per > calculated value during the usecase. > > This patch is dependent on below patch > https://patchwork.kernel.org/patch/12774067/ > > Signed-off-by: Vinod Polimera

Re: [Freedreno] [PATCH v6 4/5] arm64: dts: qcom: sdm845: remove assigned-clock-rate property for mdp clk

2022-03-17 Thread Doug Anderson
Hi, On Mon, Mar 14, 2022 at 7:47 AM Vinod Polimera wrote: > > Drop the assigned clock rate property and vote on the mdp clock as per > calculated value during the usecase. > > This patch is dependent on below patch > https://patchwork.kernel.org/patch/12774067/ > > Signed-off-by: Vinod Polimera

Re: [Freedreno] [PATCH v6 3/5] arm64: dts: qcom: sm7180: remove assigned-clock-rate property for mdp clk

2022-03-17 Thread Doug Anderson
Hi, On Mon, Mar 14, 2022 at 7:47 AM Vinod Polimera wrote: > > Drop the assigned clock rate property and vote on the mdp clock as per > calculated value during the usecase. > > This patch is dependent on below patch > https://patchwork.kernel.org/patch/12774067/ > > Signed-off-by: Vinod Polimera

Re: [Freedreno] [PATCH v6 2/5] arm64: dts: qcom: sm7280: remove assigned-clock-rate property for mdp clk

2022-03-17 Thread Doug Anderson
Hi, On Mon, Mar 14, 2022 at 7:47 AM Vinod Polimera wrote: > > Drop the assigned clock rate property and vote on the mdp clock as per > calculated value during the usecase. > > This patch is dependent on below patch > https://patchwork.kernel.org/patch/12774067/ Some nits on how you're referring

Re: [Freedreno] [PATCH v6 1/5] drm/msm/disp/dpu1: set mdp clk to the maximum frequency in opp table during probe

2022-03-17 Thread Doug Anderson
Hi, On Mon, Mar 14, 2022 at 7:47 AM Vinod Polimera wrote: > > use max clock during probe/bind sequence from the opp table. > The clock will be scaled down when framework sends an update. > > Fixes: 25fdd5933("drm/msm: Add SDM845 DPU support") The "Fixes:" format is a little wrong. Should have mo

[Freedreno] [PATCH] drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()

2022-03-17 Thread Stephen Boyd
The member 'msm_dsi->connector' isn't assigned until msm_dsi_manager_connector_init() returns (see msm_dsi_modeset_init() and how it assigns the return value). Therefore this pointer is going to be NULL here. Let's use 'connector' which is what was intended. Cc: Dmitry Baryshkov Cc: Sean Paul Fi

Re: [Freedreno] [PATCH v5 4/9] drm/panel-edp: add LQ140M1JW46 edp panel entry

2022-03-17 Thread Doug Anderson
Hi, On Wed, Mar 16, 2022 at 10:37 AM Sankeerth Billakanti wrote: > > Add panel identification entry for the sharp LQ140M1JW46 eDP panel > with power sequencing delay information. > > Signed-off-by: Sankeerth Billakanti > --- > drivers/gpu/drm/panel/panel-edp.c | 1 + > 1 file changed, 1 inserti

[Freedreno] [RFC] drm/msm: Add a way for userspace to allocate GPU iova

2022-03-17 Thread Rob Clark
From: Rob Clark The motivation at this point is mainly native userspace mesa driver in a VM guest. The one remaining synchronous "hotpath" is buffer allocation, because guest needs to wait to know the bo's iova before it can start emitting cmdstream/state that references the new bo. By allocati

Re: [Freedreno] [PATCH v5 5/9] drm/msm/dp: Add eDP support via aux_bus

2022-03-17 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2022-03-16 10:35:50) > This patch adds support for generic eDP sink through aux_bus. Please unindent commit text paragraphs. This isn't a book. > The eDP/DP controller driver should support aux transactions originating > from the panel-edp driver and hence sh

Re: [Freedreno] [PATCH v5 4/9] drm/panel-edp: add LQ140M1JW46 edp panel entry

2022-03-17 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2022-03-16 10:35:49) > Add panel identification entry for the sharp LQ140M1JW46 eDP panel > with power sequencing delay information. > > Signed-off-by: Sankeerth Billakanti > --- Reviewed-by: Stephen Boyd

Re: [Freedreno] [PATCH v5 3/9] arm64: dts: qcom: sc7280: Enable backlight for eDP panel

2022-03-17 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2022-03-16 10:35:48) > Enable backlight support for eDP panel on CRD platform for sc7280. > > Signed-off-by: Sankeerth Billakanti > --- > > Changes in v5: > - Separate out backlight nodes > > arch/arm64/boot/dts/qcom/sc7280-crd.dts | 18 ++ > 1 file

Re: [Freedreno] [PATCH v5 2/9] arm64: dts: qcom: sc7280: Add support for eDP panel on CRD

2022-03-17 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2022-03-16 10:35:47) > diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd.dts > b/arch/arm64/boot/dts/qcom/sc7280-crd.dts > index e2efbdd..2df654e 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc7280-crd.dts > @@ -7,6 +7,7 @@ >

Re: [Freedreno] [PATCH v5 1/9] arm64: dts: qcom: sc7280: rename edp_out label to mdss_edp_out

2022-03-17 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2022-03-16 10:35:46) > Rename the edp_out label in the sc7280 platform to mdss_edp_out > so that the nodes related to mdss are all grouped together in > the board specific files. > > Signed-off-by: Sankeerth Billakanti > --- Reviewed-by: Stephen Boyd

Re: [Freedreno] [PATCH v6 1/5] drm/msm/disp/dpu1: set mdp clk to the maximum frequency in opp table during probe

2022-03-17 Thread Stephen Boyd
Quoting Vinod Polimera (2022-03-14 07:46:53) > use max clock during probe/bind sequence from the opp table. > The clock will be scaled down when framework sends an update. Capitalize 'use'. Why is it important to use max frequency during probe/bind? Does not setting the clk rate during probe mean

Re: [Freedreno] [PATCH 3/3] drm/msm/gpu: Remove mutex from wait_event condition

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 1:45 PM Akhil P Oommen wrote: > > On 3/11/2022 5:16 AM, Rob Clark wrote: > > From: Rob Clark > > > > The mutex wasn't really protecting anything before. Before the previous > > patch we could still be racing with the scheduler's kthread, as that is > > not necessarily fro

Re: [Freedreno] [PATCH 3/3] drm/msm/gpu: Remove mutex from wait_event condition

2022-03-17 Thread Akhil P Oommen
On 3/11/2022 5:16 AM, Rob Clark wrote: From: Rob Clark The mutex wasn't really protecting anything before. Before the previous patch we could still be racing with the scheduler's kthread, as that is not necessarily frozen yet. Now that we've parked the sched threads, the only race is with job

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 12:50 PM Andrey Grodzovsky wrote: > > > On 2022-03-17 14:25, Rob Clark wrote: > > On Thu, Mar 17, 2022 at 11:10 AM Andrey Grodzovsky > > wrote: > >> > >> On 2022-03-17 13:35, Rob Clark wrote: > >>> On Thu, Mar 17, 2022 at 9:45 AM Christian König > >>> wrote: > Am 17.

[Freedreno] [PATCH] drm/msm: Add missing put_task_struct() in debugfs path

2022-03-17 Thread Rob Clark
From: Rob Clark Fixes: 25faf2f2e065 ("drm/msm: Show process names in gem_describe") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 02b9ae65a96a..a4f61972667b 10064

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 11:10 AM Andrey Grodzovsky wrote: > > > On 2022-03-17 13:35, Rob Clark wrote: > > On Thu, Mar 17, 2022 at 9:45 AM Christian König > > wrote: > >> Am 17.03.22 um 17:18 schrieb Rob Clark: > >>> On Thu, Mar 17, 2022 at 9:04 AM Christian König > >>> wrote: > Am 17.03.22

Re: [Freedreno] [PATCH 1/6] drm: allow real encoder to be passed for drm_writeback_connector

2022-03-17 Thread Abhinav Kumar
Hi Daniel On 3/17/2022 3:01 AM, Daniel Vetter wrote: On Fri, Mar 11, 2022 at 10:05:53AM +0200, Laurent Pinchart wrote: On Fri, Mar 11, 2022 at 10:46:13AM +0300, Dmitry Baryshkov wrote: On Fri, 11 Mar 2022 at 04:50, Abhinav Kumar wrote: For some vendor driver implementations, display hardwar

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 9:45 AM Christian König wrote: > > Am 17.03.22 um 17:18 schrieb Rob Clark: > > On Thu, Mar 17, 2022 at 9:04 AM Christian König > > wrote: > >> Am 17.03.22 um 16:10 schrieb Rob Clark: > >>> [SNIP] > >>> userspace frozen != kthread frozen .. that is what this patch is > >>>

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Daniel Vetter
On Thu, Mar 17, 2022 at 05:44:57PM +0100, Christian König wrote: > Am 17.03.22 um 17:18 schrieb Rob Clark: > > On Thu, Mar 17, 2022 at 9:04 AM Christian König > > wrote: > > > Am 17.03.22 um 16:10 schrieb Rob Clark: > > > > [SNIP] > > > > userspace frozen != kthread frozen .. that is what this pat

Re: [Freedreno] [PATCH v3 1/3] drm: allow real encoder to be passed for drm_writeback_connector

2022-03-17 Thread Abhinav Kumar
Hi Laurent Thanks for the review. On 3/17/2022 1:51 AM, Laurent Pinchart wrote: Hi Abhinav, Thank you for the patch. On Wed, Mar 16, 2022 at 11:48:16AM -0700, Abhinav Kumar wrote: For some vendor driver implementations, display hardware can be shared between the encoder used for writeback an

[Freedreno] [PATCH v2 3/3] drm/msm: Add a way to override processes comm/cmdline

2022-03-17 Thread Rob Clark
From: Rob Clark In the cause of using the GPU via virtgpu, the host side process is really a sort of proxy, and not terribly interesting from the PoV of crash/fault logging. Add a way to override these per process so that we can see the guest process's name. v2: Handle kmalloc failure, add comm

[Freedreno] [PATCH v2 2/3] drm/msm: Split out helper to get comm/cmdline

2022-03-17 Thread Rob Clark
From: Rob Clark Deduplicate this from fault_worker and recover_worker. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c

[Freedreno] [PATCH v2 1/3] drm/msm: Add support for pointer params

2022-03-17 Thread Rob Clark
From: Rob Clark The 64b value field is already suffient to hold a pointer instead of immediate, but we also need a length field. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++-- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 4 ++-- drivers/gpu/drm/msm/msm_dr

[Freedreno] [PATCH v2 0/3] drm/msm: Add comm/cmdline override

2022-03-17 Thread Rob Clark
From: Rob Clark Add a way to override comm/cmdline per-drm_file. This is useful for VM scenarios where the host process is just a proxy for the actual guest process. Rob Clark (3): drm/msm: Add support for pointer params drm/msm: Split out helper to get comm/cmdline drm/msm: Add a way to

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 9:04 AM Christian König wrote: > > Am 17.03.22 um 16:10 schrieb Rob Clark: > > [SNIP] > > userspace frozen != kthread frozen .. that is what this patch is > > trying to address, so we aren't racing between shutting down the hw > > and the scheduler shoveling more jobs at us

Re: [Freedreno] [PATCH v3 5/5] drm/msm: allow compile time selection of driver components

2022-03-17 Thread Dmitry Baryshkov
On 17/03/2022 15:44, Dmitry Baryshkov wrote: On 16/03/2022 20:26, Abhinav Kumar wrote: On 3/16/2022 12:31 AM, Dmitry Baryshkov wrote: On 16/03/2022 03:28, Abhinav Kumar wrote: On 3/3/2022 7:21 PM, Dmitry Baryshkov wrote: MSM DRM driver already allows one to compile out the DP or DSI suppo

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Matthew Brost
On Thu, Mar 17, 2022 at 03:06:18AM -0700, Christian König wrote: > Am 17.03.22 um 10:59 schrieb Daniel Vetter: > > On Thu, Mar 10, 2022 at 03:46:05PM -0800, Rob Clark wrote: > >> From: Rob Clark > >> > >> In the system suspend path, we don't want to be racing with the > >> scheduler kthreads pushi

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 3:06 AM Christian König wrote: > > Am 17.03.22 um 10:59 schrieb Daniel Vetter: > > On Thu, Mar 10, 2022 at 03:46:05PM -0800, Rob Clark wrote: > >> From: Rob Clark > >> > >> In the system suspend path, we don't want to be racing with the > >> scheduler kthreads pushing addi

Re: [Freedreno] [PATCH 3/3] drm/msm: Add a way to override processes comm/cmdline

2022-03-17 Thread Rob Clark
On Thu, Mar 17, 2022 at 1:21 AM Dan Carpenter wrote: > > On Wed, Mar 16, 2022 at 05:29:45PM -0700, Rob Clark wrote: > > switch (param) { > > + case MSM_PARAM_COMM: > > + case MSM_PARAM_CMDLINE: { > > + char *str, **paramp; > > + > > + str = kmalloc(len + 1, GF

Re: [Freedreno] [PATCH v3 5/5] drm/msm: allow compile time selection of driver components

2022-03-17 Thread Dmitry Baryshkov
On 16/03/2022 20:26, Abhinav Kumar wrote: On 3/16/2022 12:31 AM, Dmitry Baryshkov wrote: On 16/03/2022 03:28, Abhinav Kumar wrote: On 3/3/2022 7:21 PM, Dmitry Baryshkov wrote: MSM DRM driver already allows one to compile out the DP or DSI support. Add support for disabling other features l

Re: [Freedreno] [PATCH 1/6] drm: allow real encoder to be passed for drm_writeback_connector

2022-03-17 Thread Daniel Vetter
On Fri, Mar 11, 2022 at 10:05:53AM +0200, Laurent Pinchart wrote: > On Fri, Mar 11, 2022 at 10:46:13AM +0300, Dmitry Baryshkov wrote: > > On Fri, 11 Mar 2022 at 04:50, Abhinav Kumar > > wrote: > > > > > > For some vendor driver implementations, display hardware can > > > be shared between the enc

Re: [Freedreno] [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend

2022-03-17 Thread Daniel Vetter
On Thu, Mar 10, 2022 at 03:46:05PM -0800, Rob Clark wrote: > From: Rob Clark > > In the system suspend path, we don't want to be racing with the > scheduler kthreads pushing additional queued up jobs to the hw > queue (ringbuffer). So park them first. While we are at it, > move the wait for act

Re: [Freedreno] [PATCH v3 1/3] drm: allow real encoder to be passed for drm_writeback_connector

2022-03-17 Thread Laurent Pinchart
Hi Abhinav, Thank you for the patch. On Wed, Mar 16, 2022 at 11:48:16AM -0700, Abhinav Kumar wrote: > For some vendor driver implementations, display hardware can > be shared between the encoder used for writeback and the physical > display. > > In addition resources such as clocks and interrupt

Re: [Freedreno] [PATCH 3/3] drm/msm: Add a way to override processes comm/cmdline

2022-03-17 Thread Dan Carpenter
On Wed, Mar 16, 2022 at 05:29:45PM -0700, Rob Clark wrote: > switch (param) { > + case MSM_PARAM_COMM: > + case MSM_PARAM_CMDLINE: { > + char *str, **paramp; > + > + str = kmalloc(len + 1, GFP_KERNEL); if (!str) return -ENOMEM; > + if (cop

Re: [Freedreno] [PATCH 00/25] drm/msm/dpu: wide planes support

2022-03-17 Thread Dmitry Baryshkov
On 17/03/2022 04:10, Abhinav Kumar wrote: Hi Dmitry I have reviewed the series , some patches completely , some of them especially the plane to sspp mapping is something i still need to check. But I had one question on the design. I thought we were going to have a boot param to control wheth