Re: [Freedreno] [PATCH v9 01/15] drm/msm/disp/dpu: clear dpu_assign_crtc and get crtc from connector state instead of dpu_enc

2022-12-21 Thread Vinod Polimera
> -Original Message- > From: Dmitry Baryshkov > Sent: Wednesday, December 14, 2022 9:05 PM > To: Vinod Polimera (QUIC) ; dri- > de...@lists.freedesktop.org; linux-arm-...@vger.kernel.org; > freedreno@lists.freedesktop.org; devicet...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org; ro

Re: [Freedreno] [PATCH v3 1/5] PM: domains: Allow a genpd consumer to require a synced power off

2022-12-21 Thread Ulf Hansson
On Tue, 20 Dec 2022 at 08:44, Akhil P Oommen wrote: > > From: Ulf Hansson > > Some genpd providers doesn't ensure that it has turned off at hardware. > This is fine until the consumer really requires during some special > scenarios that the power domain collapse at hardware before it is > turned

[Freedreno] [PATCH v2 1/4] drm/msm/adreno: Fix null ptr access in adreno_gpu_cleanup()

2022-12-21 Thread Akhil P Oommen
Fix the below kernel panic due to null pointer access: [ 18.504431] Unable to handle kernel NULL pointer dereference at virtual address 0048 [ 18.513464] Mem abort info: [ 18.516346] ESR = 0x9605 [ 18.520204] EC = 0x25: DABT (current EL), IL = 32 bits [ 18.525

[Freedreno] [PATCH v2 3/4] drm/msm/a6xx: Update a6xx gpu coredump

2022-12-21 Thread Akhil P Oommen
Update gpu coredump for a660/a650 family of gpus with the extra information available. Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/a6xx.xml.h | 18 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 50 - drivers/g

[Freedreno] [PATCH v2 2/4] drm/msm: Fix failure paths in msm_drm_init()

2022-12-21 Thread Akhil P Oommen
Ensure that we do drm_dev_put() when there is an early return in msm_drm_init(). Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/disp/msm_disp_snapshot.c | 3 +++ drivers/gpu/drm/msm/msm_drv.c| 11 +++ 2 files changed, 10 insertions(+), 4 de

[Freedreno] [PATCH v2 4/4] drm/msm/a6xx: Update ROQ size in coredump

2022-12-21 Thread Akhil P Oommen
Since RoQ size differs between generations, calculate dynamically the RoQ size while capturing coredump. Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 11 ++- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h | 17 ++--- 2 f

[Freedreno] [PATCH v4 0/5] Improve GPU reset sequence for Adreno GPU

2022-12-21 Thread Akhil P Oommen
This is a rework of [1] using genpd instead of 'reset' framework. As per the recommended reset sequence of Adreno gpu, we should ensure that gpucc-cx-gdsc has collapsed at hardware to reset gpu's internal hardware states. Because this gdsc is implemented as 'votable', gdsc driver doesn't poll an

[Freedreno] [PATCH v4 1/5] PM: domains: Allow a genpd consumer to require a synced power off

2022-12-21 Thread Akhil P Oommen
From: Ulf Hansson Some genpd providers doesn't ensure that it has turned off at hardware. This is fine until the consumer really requires during some special scenarios that the power domain collapse at hardware before it is turned ON again. An example is the reset sequence of Adreno GPU which re

[Freedreno] [PATCH v4 2/5] clk: qcom: gdsc: Support 'synced_poweroff' genpd flag

2022-12-21 Thread Akhil P Oommen
Add support for the newly added 'synced_poweroff' genpd flag. This allows some clients (like adreno gpu driver) to request gdsc driver to ensure a votable gdsc (like gpucc cx gdsc) has collapsed at hardware. Signed-off-by: Akhil P Oommen --- (no changes since v3) Changes in v3: - Rename the var

[Freedreno] [PATCH v4 3/5] drm/msm/a6xx: Vote for cx gdsc from gpu driver

2022-12-21 Thread Akhil P Oommen
When a device has multiple power domains, dev->power_domain is left empty during probe. That didn't cause any issue so far because we are freeloading on smmu driver's vote on cx gdsc. Instead of that, create a device_link between cx genpd device and gmu device to keep a vote from gpu driver. Befor

[Freedreno] [PATCH v4 4/5] drm/msm/a6xx: Remove cx gdsc polling using 'reset'

2022-12-21 Thread Akhil P Oommen
Remove the unused 'reset' interface which was supposed to help to ensure that cx gdsc has collapsed during gpu recovery. This is was not enabled so far due to missing gpucc driver support. Similar functionality using genpd framework will be implemented in the upcoming patch. This effectively rever

[Freedreno] [PATCH v4 5/5] drm/msm/a6xx: Use genpd notifier to ensure cx-gdsc collapse

2022-12-21 Thread Akhil P Oommen
As per the recommended recovery sequence of adreno gpu, cx gdsc should collapse at hardware before it is turned back ON. This helps to clear out the stale states in hardware before it is reinitialized. Use the genpd notifier along with the newly introduced dev_pm_genpd_synced_poweroff() api to ensu

Re: [Freedreno] [PATCH v3 1/5] PM: domains: Allow a genpd consumer to require a synced power off

2022-12-21 Thread Akhil P Oommen
On 12/21/2022 8:13 PM, Ulf Hansson wrote: > On Tue, 20 Dec 2022 at 08:44, Akhil P Oommen wrote: >> From: Ulf Hansson >> >> Some genpd providers doesn't ensure that it has turned off at hardware. >> This is fine until the consumer really requires during some special >> scenarios that the power dom

Re: [Freedreno] [PATCH v9 01/15] drm/msm/disp/dpu: clear dpu_assign_crtc and get crtc from connector state instead of dpu_enc

2022-12-21 Thread Dmitry Baryshkov
On 21/12/2022 16:10, Vinod Polimera wrote: -Original Message- From: Dmitry Baryshkov Sent: Wednesday, December 14, 2022 9:05 PM To: Vinod Polimera (QUIC) ; dri- de...@lists.freedesktop.org; linux-arm-...@vger.kernel.org; freedreno@lists.freedesktop.org; devicet...@vger.kernel.org Cc:

[Freedreno] [PATCH v2 3/8] drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf

2022-12-21 Thread Marijn Suijten
According to downstream /and the comment copied from it/ this comparison should be the other way around. In other words, when the panel driver requests to use more slices per packet than what could be sent over this interface, it is bumped down to only use a single slice per packet (and strangely

[Freedreno] [PATCH v2 5/8] drm/msm/dpu: Reject topologies for which no DSC blocks are available

2022-12-21 Thread Marijn Suijten
Resource allocation of DSC blocks should behave more like LMs and CTLs where NULL resources (based on initial hw_blk creation via definitions in the catalog) are skipped ^1. The current hardcoded mapping of DSC blocks however means that resource allocation shouldn't succeed at all when the DSC blo

[Freedreno] [PATCH v2 6/8] drm/msm/dpu: Remove num_enc from topology struct in favour of num_dsc

2022-12-21 Thread Marijn Suijten
Downstream calls this num_enc yet the DSC patches introduced a new num_dsc struct member, leaving num_enc effectively unused. Fixes: 7e9cc175b159 ("drm/msm/disp/dpu1: Add support for DSC in topology") Signed-off-by: Marijn Suijten --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 - dr

[Freedreno] [PATCH v2 8/8] drm/msm/dpu: Add DSC configuration for SM8150 and SM8250

2022-12-21 Thread Marijn Suijten
These DSC blocks on CTL V1 need to set its corresponding PINGPONG block index in a hardware register to configure where to send pixel output to, via the newly-added DPU_DSC_OUTPUT_CTRL feature flag. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- .../

[Freedreno] [PATCH v2 1/8] drm/msm/dpu: Wire up DSC mask for active CTL configuration

2022-12-21 Thread Marijn Suijten
Active CTLs have to configure what DSC block(s) have to be enabled, and what DSC block(s) have to be flushed; this value was initialized to zero resulting in the necessary register writes to never happen (or would write zero otherwise). This seems to have gotten lost in the DSC v4->v5 series while

[Freedreno] [PATCH v2 0/8] drm/msm: DSC Electric Boogaloo for sm8[12]50

2022-12-21 Thread Marijn Suijten
This preliminary Display Stream Compression support package for (initially tested on) sm8[12]50 is based on comparing DSC behaviour between downstream and mainline. Some new callbacks are added (for binding blocks on active CTLs), logic bugs are corrected, zeroed struct members are now assigned pr

[Freedreno] [PATCH v2 2/8] drm/msm/dsi: Use DSC slice(s) packet size to compute word count

2022-12-21 Thread Marijn Suijten
According to downstream the value to use for WORD_COUNT is bytes_per_pkt, which denotes the number of bytes in a packet based on how many slices have been configured by the panel driver times the width of a slice times the number of bytes per pixel. The DSC panels seen thus far use one byte per pi

[Freedreno] [PATCH v2 4/8] drm/msm/dpu: Disallow unallocated resources to be returned

2022-12-21 Thread Marijn Suijten
In the event that the topology requests resources that have not been created by the system (because they are typically not represented in dpu_mdss_cfg ^1), the resource(s) in global_state (in this case DSC blocks) remain NULL but will still be returned out of dpu_rm_get_assigned_resources, where th

[Freedreno] [PATCH v2 7/8] drm/msm/dpu: Implement DSC binding to PP block for CTL V1

2022-12-21 Thread Marijn Suijten
All V1 CTL blocks (active CTLs) explicitly bind the pixel output from a DSC block to a PINGPONG block by setting the PINGPONG index in a DSC hardware register. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

Re: [Freedreno] [PATCH 1/2] drm/msm/dsi: add a helper method to compute the dsi byte clk

2022-12-21 Thread Abhinav Kumar
Hi Dmitry Sorry for the late response. On 10/31/2022 5:20 PM, Dmitry Baryshkov wrote: On 28/10/2022 01:22, Abhinav Kumar wrote: On 10/27/2022 10:35 AM, Dmitry Baryshkov wrote: On 22/09/2022 03:49, Abhinav Kumar wrote: Re-arrange the dsi_calc_pclk method to two helpers, one to compute the D