Re: [Freedreno] [PATCH v3 06/18] drm/msm/dpu: rename dpu_hw_pipe_cdp_cfg to dpu_hw_cdp_cfg

2022-04-21 Thread Dmitry Baryshkov
On Thu, 21 Apr 2022 at 02:50, Abhinav Kumar wrote: > > Rename dpu_hw_pipe_cdp_cfg to dpu_hw_cdp_cfg and move it > to dpu_hw_utils file so that other modules in addition to > SSPP such as writeback can use it as all the fields can > be used by writeback as well. > > Suggested-by: Dmitry Baryshkov

Re: [Freedreno] [PATCH v3 08/18] drm/msm/dpu: add writeback blocks to DPU RM

2022-04-21 Thread Dmitry Baryshkov
On Thu, 21 Apr 2022 at 02:50, Abhinav Kumar wrote: > > Add writeback blocks to DPU resource manager so that > the encoders can directly request them through RM. > > changes in v3: > - use IS_ERR() instead of IS_ERR_OR_NULL() > > Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov

Re: [Freedreno] [PATCH v3 09/18] drm/msm/dpu: add changes to support writeback in hw_ctl

2022-04-21 Thread Dmitry Baryshkov
On Thu, 21 Apr 2022 at 02:50, Abhinav Kumar wrote: > > Add changes to support writeback module in the dpu_hw_ctl > interface. > > changes in v3: > - read the intf_active and wb_active before writing > to preserve existing bits > - add the update_pending_flush_wb for non-v

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

2022-04-21 Thread Liviu Dudau
Hi Abhinav, Sorry for the delay in reviewing this, Easter break happened in between. On Fri, Apr 08, 2022 at 05:53:54PM -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

Re: [Freedreno] [PATCH v2 04/17] drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog

2022-04-21 Thread Liviu Dudau
On Tue, Apr 19, 2022 at 06:45:56PM -0700, Abhinav Kumar wrote: > Add writeback blocks to the sm8250 DPU hardware catalog. Other > chipsets support writeback too but add it to sm8250 to prototype > the feature so that it can be easily extended to other chipsets. > > changes in v2: > - none >

[Freedreno] [PATCH] drm/msm: change msm_sched_ops from global to static

2022-04-21 Thread Tom Rix
Smatch reports this issue msm_ringbuffer.c:43:36: warning: symbol 'msm_sched_ops' was not declared. Should it be static? msm_sched_ops is only used in msm_ringbuffer.c so change its storage-class specifier to static. Signed-off-by: Tom Rix --- drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +- 1 fil

[Freedreno] [PATCH v8 0/4] Add support for the eDP panel over aux_bus

2022-04-21 Thread Sankeerth Billakanti
This series adds support for generic eDP panel over aux_bus. These changes are dependent on the following patches: https://patchwork.kernel.org/project/linux-arm-msm/patch/20220211224006.1797846-5-dmitry.barysh...@linaro.org/ https://patchwork.kernel.org/project/linux-arm-msm/patch/20220211224006.

[Freedreno] [PATCH v8 1/4] drm/msm/dp: Add eDP support via aux_bus

2022-04-21 Thread Sankeerth Billakanti
This patch adds support for generic eDP sink through aux_bus. The eDP/DP controller driver should support aux transactions originating from the panel-edp driver and hence should be initialized and ready. The panel bridge supporting the panel should be ready before the bridge connector is initializ

[Freedreno] [PATCH v8 2/4] drm/msm/dp: Support only IRQ_HPD and REPLUG interrupts for eDP

2022-04-21 Thread Sankeerth Billakanti
The panel-edp enables the eDP panel power during probe, get_modes and pre-enable. The eDP connect and disconnect interrupts for the eDP/DP controller are directly dependent on panel power. As eDP display can be assumed as always connected, the controller driver can skip the eDP connect and disconne

[Freedreno] [PATCH v8 3/4] drm/msm/dp: wait for hpd high before aux transaction

2022-04-21 Thread Sankeerth Billakanti
The source device should ensure the sink is ready before proceeding to read the sink capability or perform any aux transactions. The sink will indicate its readiness by asserting the HPD line. The controller driver needs to wait for the hpd line to be asserted by the sink before it performs any aux

[Freedreno] [PATCH v8 4/4] drm/msm/dp: Support the eDP modes given by panel

2022-04-21 Thread Sankeerth Billakanti
The eDP controller does not have a reliable way keep panel powered on to read the sink capabilities. So, the controller driver cannot validate if a mode can be supported by the source. We will rely on the panel driver to populate only the supported modes for now. Signed-off-by: Sankeerth Billakant

Re: [Freedreno] [PATCH v8 1/4] drm/msm/dp: Add eDP support via aux_bus

2022-04-21 Thread Doug Anderson
Hi, On Thu, Apr 21, 2022 at 7:37 AM Sankeerth Billakanti wrote: > > @@ -1530,6 +1532,61 @@ void msm_dp_debugfs_init(struct msm_dp *dp_display, > struct drm_minor *minor) > } > } > > +static int dp_display_get_next_bridge(struct msm_dp *dp) > +{ > + int rc; > + struct dp_disp

Re: [Freedreno] [PATCH v8 2/4] drm/msm/dp: Support only IRQ_HPD and REPLUG interrupts for eDP

2022-04-21 Thread Doug Anderson
Hi, On Thu, Apr 21, 2022 at 7:37 AM Sankeerth Billakanti wrote: > > The panel-edp enables the eDP panel power during probe, get_modes > and pre-enable. The eDP connect and disconnect interrupts for the eDP/DP > controller are directly dependent on panel power. As eDP display can be > assumed as a

Re: [Freedreno] [PATCH v8 1/4] drm/msm/dp: Add eDP support via aux_bus

2022-04-21 Thread Sankeerth Billakanti (QUIC)
Hi Doug, >On Thu, Apr 21, 2022 at 7:37 AM Sankeerth Billakanti > wrote: >> >> @@ -1530,6 +1532,61 @@ void msm_dp_debugfs_init(struct msm_dp >*dp_display, struct drm_minor *minor) >> } >> } >> >> +static int dp_display_get_next_bridge(struct msm_dp *dp) { >> + int rc; >> + stru

Re: [Freedreno] [PATCH v8 1/4] drm/msm/dp: Add eDP support via aux_bus

2022-04-21 Thread Doug Anderson
Hi, On Thu, Apr 21, 2022 at 9:00 AM Sankeerth Billakanti (QUIC) wrote: > > >> + } > >> + > >> + /* > >> +* External bridges are mandatory for eDP interfaces: one has to > >> +* provide at least an eDP panel (which gets wrapped into panel- > >bridge). > >> +* >

Re: [Freedreno] [PATCH v8 2/4] drm/msm/dp: Support only IRQ_HPD and REPLUG interrupts for eDP

2022-04-21 Thread Sankeerth Billakanti (QUIC)
Hi Doug, >On Thu, Apr 21, 2022 at 7:37 AM Sankeerth Billakanti > wrote: >> >> The panel-edp enables the eDP panel power during probe, get_modes and >> pre-enable. The eDP connect and disconnect interrupts for the eDP/DP >> controller are directly dependent on panel power. As eDP display can >> be

Re: [Freedreno] [PATCH v8 2/4] drm/msm/dp: Support only IRQ_HPD and REPLUG interrupts for eDP

2022-04-21 Thread Doug Anderson
Hi, On Thu, Apr 21, 2022 at 9:39 AM Sankeerth Billakanti (QUIC) wrote: > > Hi Doug, > > >On Thu, Apr 21, 2022 at 7:37 AM Sankeerth Billakanti > > wrote: > >> > >> The panel-edp enables the eDP panel power during probe, get_modes and > >> pre-enable. The eDP connect and disconnect interrupts for t

[Freedreno] [PATCH] drm/msm: Fix null pointer dereferences without iommu

2022-04-21 Thread Luca Weiss
Check if 'aspace' is set before using it as it will stay null without IOMMU, such as on msm8974. Fixes: bc2112583a0b ("drm/msm/gpu: Track global faults per address-space") Signed-off-by: Luca Weiss --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 - drivers/gpu/drm/msm/msm_gpu.c | 3

[Freedreno] [RFC 0/4] Separate wb_idx and intf_idx in dpu_encoder

2022-04-21 Thread Abhinav Kumar
As promised here [1], this is a follow up change to separate out wb_idx and intf_idx for better clarity in dpu_encoder. This also helps to easily handle boards which do not have a physical display but can still be validated using writeback interface. In addition, this also takes care of adding wb

[Freedreno] [RFC 2/4] drm/msm/dpu: start using wb_idx in dpu_encoder_phys_wb

2022-04-21 Thread Abhinav Kumar
Convert all the usages of intf_idx to wb_idx in dpu_encoder_phys_wb. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/

[Freedreno] [RFC 4/4] drm/msm/dpu: add wb_idx to DRM traces in dpu_encoder

2022-04-21 Thread Abhinav Kumar
Change the DRM traces to include both the intf_mode and wb_idx similar to the DRM prints in the previous change. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 13 - drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 26 ++ 2 files c

[Freedreno] [RFC 3/4] drm/msm/dpu: add wb_idx to existing DRM prints in dpu_encoder

2022-04-21 Thread Abhinav Kumar
Add wb_idx to existing DRM prints in dpu_encoder and also print the intf_mode so that its clear that for any INTF_CMD/VID there will be a valid intf_idx and any INTF_WB_* there will be a valid wb_idx. Update the debugfs to add the same information. Here is a sample output with this change: root:/

[Freedreno] [RFC 1/4] drm/msm/dpu: introduce a wb_idx to be used for writeback interfaces

2022-04-21 Thread Abhinav Kumar
Using intf_idx even for writeback interfaces is confusing because intf_idx is of type enum dpu_intf but the index used for writeback is of type enum dpu_wb. In addition, this makes it easier to separately check the availability of the two as its possible that there are boards which don't have any

Re: [Freedreno] [RFC 1/4] drm/msm/dpu: introduce a wb_idx to be used for writeback interfaces

2022-04-21 Thread Dmitry Baryshkov
On 21/04/2022 23:48, Abhinav Kumar wrote: Using intf_idx even for writeback interfaces is confusing because intf_idx is of type enum dpu_intf but the index used for writeback is of type enum dpu_wb. In addition, this makes it easier to separately check the availability of the two as its possible

Re: [Freedreno] [RFC 3/4] drm/msm/dpu: add wb_idx to existing DRM prints in dpu_encoder

2022-04-21 Thread Dmitry Baryshkov
On 21/04/2022 23:48, Abhinav Kumar wrote: Add wb_idx to existing DRM prints in dpu_encoder and also print the intf_mode so that its clear that for any INTF_CMD/VID there will be a valid intf_idx and any INTF_WB_* there will be a valid wb_idx. Update the debugfs to add the same information. Here

Re: [Freedreno] [RFC 4/4] drm/msm/dpu: add wb_idx to DRM traces in dpu_encoder

2022-04-21 Thread Dmitry Baryshkov
On 21/04/2022 23:48, Abhinav Kumar wrote: Change the DRM traces to include both the intf_mode and wb_idx similar to the DRM prints in the previous change. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 13 - drive

Re: [Freedreno] [RFC 1/4] drm/msm/dpu: introduce a wb_idx to be used for writeback interfaces

2022-04-21 Thread Abhinav Kumar
Hi Dmitry Thanks for the review. One question below. On 4/21/2022 3:40 PM, Dmitry Baryshkov wrote: On 21/04/2022 23:48, Abhinav Kumar wrote: Using intf_idx even for writeback interfaces is confusing because intf_idx is of type enum dpu_intf but the index used for writeback is of type enum dpu

Re: [Freedreno] [RFC 1/4] drm/msm/dpu: introduce a wb_idx to be used for writeback interfaces

2022-04-21 Thread Dmitry Baryshkov
On Fri, 22 Apr 2022 at 02:07, Abhinav Kumar wrote: > > Hi Dmitry > > Thanks for the review. > > One question below. > > On 4/21/2022 3:40 PM, Dmitry Baryshkov wrote: > > On 21/04/2022 23:48, Abhinav Kumar wrote: > >> Using intf_idx even for writeback interfaces is confusing > >> because intf_idx i

Re: [Freedreno] [RFC 1/4] drm/msm/dpu: introduce a wb_idx to be used for writeback interfaces

2022-04-21 Thread Abhinav Kumar
On 4/21/2022 5:22 PM, Dmitry Baryshkov wrote: On Fri, 22 Apr 2022 at 02:07, Abhinav Kumar wrote: Hi Dmitry Thanks for the review. One question below. On 4/21/2022 3:40 PM, Dmitry Baryshkov wrote: On 21/04/2022 23:48, Abhinav Kumar wrote: Using intf_idx even for writeback interfaces is

Re: [Freedreno] [PATCH] clk: qcom: clk-rcg2: fix gfx3d frequency calculation

2022-04-21 Thread Stephen Boyd
+Maxime Quoting Dmitry Baryshkov (2022-04-19 16:54:47) > Since the commit 948fb0969eae ("clk: Always clamp the rounded rate"), > the clk_core_determine_round_nolock() would clamp the requested rate > between min and max rates from the rate request. Normally these fields > would be filled by clk_co

Re: [Freedreno] [PATCH] drm/msm/hdmi: check return value after calling platform_get_resource_byname()

2022-04-21 Thread Abhinav Kumar
On 4/21/2022 8:22 PM, Yang Yingliang wrote: It will cause null-ptr-deref if platform_get_resource_byname() returns NULL, we need check the return value. Fixes: c6a57a50ad56 ("drm/msm/hdmi: add hdmi hdcp support (V3)") Signed-off-by: Yang Yingliang Reviewed-by: Abhinav Kumar --- drivers/