Re: [Freedreno] [PATCH] drm/msm: fix arm64 build error

2018-12-10 Thread Rob Clark
On Mon, Dec 10, 2018 at 3:56 PM Arnd Bergmann  wrote:
>
> The new a200 GPU MMU support fails to build on arm64 because
> of a conflicting macro name:
>
> drivers/gpu/drm/msm/msm_gpummu.c:17: error: "VA_START" redefined [-Werror]
>  #define VA_START SZ_16M
>
> In file included from arch/arm64/include/asm/pgtable-hwdef.h:19,
>  from arch/arm64/include/asm/processor.h:48,
>  from include/linux/mutex.h:19,
>  from include/linux/notifier.h:14,
>  from include/linux/clk.h:17,
>  from drivers/gpu/drm/msm/msm_drv.h:23,
>  from drivers/gpu/drm/msm/msm_gpummu.c:4:
> arch/arm64/include/asm/memory.h:51: note: this is the location of the 
> previous definition
>  #define VA_START  (UL(0x) - \
>
> Rename this and the related macros with a GPU_ prefix.
>
> Fixes: 1c0088f255ae ("drm/msm: implement a2xx mmu")
> Signed-off-by: Arnd Bergmann 

fyi I've updated this patch in msm-next/linux-next with a fixup from
Jonathan which prefixes these with GPUMMU_*

not entirely sure why I didn't hit this build error locally, but
thanks to you and kbuild-robot for noticing so we could fix

BR,
-R


> ---
>  drivers/gpu/drm/msm/msm_gpummu.c | 24 
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_gpummu.c 
> b/drivers/gpu/drm/msm/msm_gpummu.c
> index f1dc2b7e5fd3..2a7ddd449d3d 100644
> --- a/drivers/gpu/drm/msm/msm_gpummu.c
> +++ b/drivers/gpu/drm/msm/msm_gpummu.c
> @@ -14,10 +14,10 @@ struct msm_gpummu {
>  };
>  #define to_msm_gpummu(x) container_of(x, struct msm_gpummu, base)
>
> -#define VA_START SZ_16M
> -#define VA_RANGE (0xfff * SZ_64K)
> -#define MMU_PAGE_SIZE SZ_4K
> -#define TABLE_SIZE (sizeof(uint32_t) * VA_RANGE / MMU_PAGE_SIZE)
> +#define GPU_VA_START SZ_16M
> +#define GPU_VA_RANGE (0xfff * SZ_64K)
> +#define GPU_MMU_PAGE_SIZE SZ_4K
> +#define GPU_TABLE_SIZE (sizeof(uint32_t) * GPU_VA_RANGE / GPU_MMU_PAGE_SIZE)
>
>  static int msm_gpummu_attach(struct msm_mmu *mmu, const char * const *names,
> int cnt)
> @@ -34,7 +34,7 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t 
> iova,
> struct sg_table *sgt, unsigned len, int prot)
>  {
> struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
> -   unsigned idx = (iova - VA_START) / MMU_PAGE_SIZE;
> +   unsigned idx = (iova - GPU_VA_START) / GPU_MMU_PAGE_SIZE;
> struct scatterlist *sg;
> unsigned prot_bits = 0;
> unsigned i, j;
> @@ -46,9 +46,9 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t 
> iova,
>
> for_each_sg(sgt->sgl, sg, sgt->nents, i) {
> dma_addr_t addr = sg->dma_address;
> -   for (j = 0; j < sg->length / MMU_PAGE_SIZE; j++, idx++) {
> +   for (j = 0; j < sg->length / GPU_MMU_PAGE_SIZE; j++, idx++) {
> gpummu->table[idx] = addr | prot_bits;
> -   addr += MMU_PAGE_SIZE;
> +   addr += GPU_MMU_PAGE_SIZE;
> }
> }
>
> @@ -62,10 +62,10 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t 
> iova,
>  static int msm_gpummu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len)
>  {
> struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
> -   unsigned idx = (iova - VA_START) / MMU_PAGE_SIZE;
> +   unsigned idx = (iova - GPU_VA_START) / GPU_MMU_PAGE_SIZE;
> unsigned i;
>
> -   for (i = 0; i < len / MMU_PAGE_SIZE; i++, idx++)
> +   for (i = 0; i < len / GPU_MMU_PAGE_SIZE; i++, idx++)
>  gpummu->table[idx] = 0;
>
> gpu_write(gpummu->gpu, REG_A2XX_MH_MMU_INVALIDATE,
> @@ -78,7 +78,7 @@ static void msm_gpummu_destroy(struct msm_mmu *mmu)
>  {
> struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
>
> -   dma_free_attrs(mmu->dev, TABLE_SIZE, gpummu->table, gpummu->pt_base,
> +   dma_free_attrs(mmu->dev, GPU_TABLE_SIZE, gpummu->table, 
> gpummu->pt_base,
> DMA_ATTR_FORCE_CONTIGUOUS);
>
> kfree(gpummu);
> @@ -100,7 +100,7 @@ struct msm_mmu *msm_gpummu_new(struct device *dev, struct 
> msm_gpu *gpu)
> if (!gpummu)
> return ERR_PTR(-ENOMEM);
>
> -   gpummu->table = dma_alloc_attrs(dev, TABLE_SIZE + 32, 
> &gpummu->pt_base,
> +   gpummu->table = dma_alloc_attrs(dev, GPU_TABLE_SIZE + 32, 
> &gpummu->pt_base,
> GFP_KERNEL | __GFP_ZERO, DMA_ATTR_FORCE_CONTIGUOUS);
> if (!gpummu->table) {
> kfree(gpummu);
> @@ -119,5 +119,5 @@ void msm_gpummu_params(struct msm_mmu *mmu, dma_addr_t 
> *pt_base,
> dma_addr_t base = to_msm_gpummu(mmu)->pt_base;
>
> *pt_base = base;
> -   *tran_error = base + TABLE_SIZE; /* 32-byte aligned */
> +   *tran_error = base + GPU_TABLE_SIZE; /* 32-byte aligned */
>  }
> --
> 2.20.0
>
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://

[Freedreno] [PATCH] drm/msm: fix arm64 build error

2018-12-10 Thread Arnd Bergmann
The new a200 GPU MMU support fails to build on arm64 because
of a conflicting macro name:

drivers/gpu/drm/msm/msm_gpummu.c:17: error: "VA_START" redefined [-Werror]
 #define VA_START SZ_16M

In file included from arch/arm64/include/asm/pgtable-hwdef.h:19,
 from arch/arm64/include/asm/processor.h:48,
 from include/linux/mutex.h:19,
 from include/linux/notifier.h:14,
 from include/linux/clk.h:17,
 from drivers/gpu/drm/msm/msm_drv.h:23,
 from drivers/gpu/drm/msm/msm_gpummu.c:4:
arch/arm64/include/asm/memory.h:51: note: this is the location of the previous 
definition
 #define VA_START  (UL(0x) - \

Rename this and the related macros with a GPU_ prefix.

Fixes: 1c0088f255ae ("drm/msm: implement a2xx mmu")
Signed-off-by: Arnd Bergmann 
---
 drivers/gpu/drm/msm/msm_gpummu.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm/msm/msm_gpummu.c
index f1dc2b7e5fd3..2a7ddd449d3d 100644
--- a/drivers/gpu/drm/msm/msm_gpummu.c
+++ b/drivers/gpu/drm/msm/msm_gpummu.c
@@ -14,10 +14,10 @@ struct msm_gpummu {
 };
 #define to_msm_gpummu(x) container_of(x, struct msm_gpummu, base)
 
-#define VA_START SZ_16M
-#define VA_RANGE (0xfff * SZ_64K)
-#define MMU_PAGE_SIZE SZ_4K
-#define TABLE_SIZE (sizeof(uint32_t) * VA_RANGE / MMU_PAGE_SIZE)
+#define GPU_VA_START SZ_16M
+#define GPU_VA_RANGE (0xfff * SZ_64K)
+#define GPU_MMU_PAGE_SIZE SZ_4K
+#define GPU_TABLE_SIZE (sizeof(uint32_t) * GPU_VA_RANGE / GPU_MMU_PAGE_SIZE)
 
 static int msm_gpummu_attach(struct msm_mmu *mmu, const char * const *names,
int cnt)
@@ -34,7 +34,7 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t iova,
struct sg_table *sgt, unsigned len, int prot)
 {
struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
-   unsigned idx = (iova - VA_START) / MMU_PAGE_SIZE;
+   unsigned idx = (iova - GPU_VA_START) / GPU_MMU_PAGE_SIZE;
struct scatterlist *sg;
unsigned prot_bits = 0;
unsigned i, j;
@@ -46,9 +46,9 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t iova,
 
for_each_sg(sgt->sgl, sg, sgt->nents, i) {
dma_addr_t addr = sg->dma_address;
-   for (j = 0; j < sg->length / MMU_PAGE_SIZE; j++, idx++) {
+   for (j = 0; j < sg->length / GPU_MMU_PAGE_SIZE; j++, idx++) {
gpummu->table[idx] = addr | prot_bits;
-   addr += MMU_PAGE_SIZE;
+   addr += GPU_MMU_PAGE_SIZE;
}
}
 
@@ -62,10 +62,10 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t 
iova,
 static int msm_gpummu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len)
 {
struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
-   unsigned idx = (iova - VA_START) / MMU_PAGE_SIZE;
+   unsigned idx = (iova - GPU_VA_START) / GPU_MMU_PAGE_SIZE;
unsigned i;
 
-   for (i = 0; i < len / MMU_PAGE_SIZE; i++, idx++)
+   for (i = 0; i < len / GPU_MMU_PAGE_SIZE; i++, idx++)
 gpummu->table[idx] = 0;
 
gpu_write(gpummu->gpu, REG_A2XX_MH_MMU_INVALIDATE,
@@ -78,7 +78,7 @@ static void msm_gpummu_destroy(struct msm_mmu *mmu)
 {
struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
 
-   dma_free_attrs(mmu->dev, TABLE_SIZE, gpummu->table, gpummu->pt_base,
+   dma_free_attrs(mmu->dev, GPU_TABLE_SIZE, gpummu->table, gpummu->pt_base,
DMA_ATTR_FORCE_CONTIGUOUS);
 
kfree(gpummu);
@@ -100,7 +100,7 @@ struct msm_mmu *msm_gpummu_new(struct device *dev, struct 
msm_gpu *gpu)
if (!gpummu)
return ERR_PTR(-ENOMEM);
 
-   gpummu->table = dma_alloc_attrs(dev, TABLE_SIZE + 32, &gpummu->pt_base,
+   gpummu->table = dma_alloc_attrs(dev, GPU_TABLE_SIZE + 32, 
&gpummu->pt_base,
GFP_KERNEL | __GFP_ZERO, DMA_ATTR_FORCE_CONTIGUOUS);
if (!gpummu->table) {
kfree(gpummu);
@@ -119,5 +119,5 @@ void msm_gpummu_params(struct msm_mmu *mmu, dma_addr_t 
*pt_base,
dma_addr_t base = to_msm_gpummu(mmu)->pt_base;
 
*pt_base = base;
-   *tran_error = base + TABLE_SIZE; /* 32-byte aligned */
+   *tran_error = base + GPU_TABLE_SIZE; /* 32-byte aligned */
 }
-- 
2.20.0

___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH 1/2] drm/msm/adreno: Make adreno_gpu_state_get() return void

2018-12-10 Thread Jordan Crouse
On Mon, Dec 10, 2018 at 05:34:21PM +0530, Sharat Masetty wrote:
> We are not really checking the state of the adreno_gpu_state_get()
> function at the callers and in addition the state capture is mostly a
> best effort service, so make the function return void.

Reviewed-by: Jordan Crouse 
> Signed-off-by: Sharat Masetty 
> ---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +-
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c 
> b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 1ca4bea..40bcf32 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -380,7 +380,7 @@ bool adreno_idle(struct msm_gpu *gpu, struct 
> msm_ringbuffer *ring)
>   return false;
>  }
>  
> -int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
> +void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
>  {
>   struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
>   int i, count = 0;
> @@ -437,8 +437,6 @@ int adreno_gpu_state_get(struct msm_gpu *gpu, struct 
> msm_gpu_state *state)
>  
>   state->nr_registers = count;
>   }
> -
> - return 0;
>  }
>  
>  void adreno_gpu_state_destroy(struct msm_gpu_state *state)
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h 
> b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> index 4973c8c..d4834b3 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> @@ -235,7 +235,7 @@ int adreno_gpu_init(struct drm_device *drm, struct 
> platform_device *pdev,
>  
>  void adreno_gpu_state_destroy(struct msm_gpu_state *state);
>  
> -int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
> +void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
>  int adreno_gpu_state_put(struct msm_gpu_state *state);
>  
>  /* ringbuffer helpers (the parts that are adreno specific) */
> -- 
> 1.9.1
> 

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH v4 5/8] drm/msm/dsi: 10nm PHY: Get ref clock from the DT

2018-12-10 Thread Stephen Boyd
Quoting Matthias Kaehlcke (2018-12-04 14:42:31)
> Get the ref clock of the PHY from the device tree instead of
> hardcoding its name and rate.
> 
> Note: This change could break old out-of-tree DTS files that
> use the 10nm PHY
> 
> Signed-off-by: Matthias Kaehlcke 
> Reviewed-by: Douglas Anderson 
> ---
> Changes in v4:
> - none
> 
> Changes in v3:
> - fixed check for EPROBE_DEFER
> - added note to commit message about breaking old DTS files
> - added 'Reviewed-by: Douglas Anderson ' tag
> 
> Changes in v2:
> - remove anonymous array in clk_init_data assignment
> - log error code if devm_clk_get() fails
> - don't log devm_clk_get() failures for -EPROBE_DEFER
> - updated commit message
> ---
>  drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 13 -
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c 
> b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
> index 4c03f0b7343ed..2d23372acd20d 100644
> --- a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
> +++ b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
> @@ -91,6 +91,7 @@ struct dsi_pll_10nm {
> void __iomem *phy_cmn_mmio;
> void __iomem *mmio;
>  
> +   struct clk *vco_ref_clk;

Same comment, and also get the name in probe or pass the clk pointer
around instead of storing it forever.

> u64 vco_ref_clk_rate;
> u64 vco_current_rate;
>  
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH v4 4/8] drm/msm/dsi: 14nm PHY: Get ref clock from the DT

2018-12-10 Thread Stephen Boyd
Quoting Matthias Kaehlcke (2018-12-04 14:42:30)
> diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c 
> b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c
> index 71fe60e5f01f1..032bf3e8614bd 100644
> --- a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c
> +++ b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c
> @@ -40,7 +40,6 @@
>  
>  #define NUM_PROVIDED_CLKS  2
>  
> -#define VCO_REF_CLK_RATE   1920
>  #define VCO_MIN_RATE   13UL
>  #define VCO_MAX_RATE   26UL
>  
> @@ -139,6 +138,7 @@ struct dsi_pll_14nm {
> /* protects REG_DSI_14nm_PHY_CMN_CLK_CFG0 register */
> spinlock_t postdiv_lock;
>  
> +   struct clk *vco_ref_clk;

Is there any need to keep it in the struct? Or just get the clk, find
the rate, and then put the clk and call pll_14nm_postdiv_register()?

> u64 vco_current_rate;
> u64 vco_ref_clk_rate;
>  
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH v4 3/8] drm/msm/dsi: 28nm PHY: Get ref clock from the DT

2018-12-10 Thread Stephen Boyd
Quoting Matthias Kaehlcke (2018-12-04 14:42:29)
> Get the ref clock of the PHY from the device tree instead of
> hardcoding its name and rate.
> 
> Signed-off-by: Matthias Kaehlcke 
> ---

Reviewed-by: Stephen Boyd 

___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH v4 2/8] drm/msm/dsi: 28nm 8960 PHY: Get ref clock from the DT

2018-12-10 Thread Stephen Boyd
Quoting Matthias Kaehlcke (2018-12-04 14:42:28)
> Get the ref clock of the PHY from the device tree instead of
> hardcoding its name and rate.
> 
> Signed-off-by: Matthias Kaehlcke 
> ---

Reviewed-by: Stephen Boyd 

___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH 2/2] drm/msm/a6xx: Fix NULL dereference during crashstate capture

2018-12-10 Thread Jordan Crouse
On Mon, Dec 10, 2018 at 05:34:22PM +0530, Sharat Masetty wrote:
> The gpu crashstate's base objects registers pointer can be NULL if the
> target implementation decides to capture the register dump on its own.
> This patch simply checks for NULL before dereferencing.
> 
> Signed-off-by: Sharat Masetty 
> ---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c | 15 ++-
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c 
> b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 40bcf32..a39cebc 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -415,6 +415,9 @@ void adreno_gpu_state_get(struct msm_gpu *gpu, struct 
> msm_gpu_state *state)
>   }
>   }
>  
> + if (!adreno_gpu->registers)
> + return;
> +

This looks good - we should get it in the 4.21 pull.

>   /* Count the number of registers */
>   for (i = 0; adreno_gpu->registers[i] != ~0; i += 2)
>   count += adreno_gpu->registers[i + 1] -
> @@ -550,12 +553,14 @@ void adreno_show(struct msm_gpu *gpu, struct 
> msm_gpu_state *state,
>   }
>   }
>  
> - drm_puts(p, "registers:\n");
> + if (state->nr_registers > 0) {
> + drm_puts(p, "registers:\n");
>  
> - for (i = 0; i < state->nr_registers; i++) {
> - drm_printf(p, "  - { offset: 0x%04x, value: 0x%08x }\n",
> - state->registers[i * 2] << 2,
> - state->registers[(i * 2) + 1]);
> + for (i = 0; i < state->nr_registers; i++) {
> + drm_printf(p, "  - { offset: 0x%04x, value: 0x%08x }\n",
> + state->registers[i * 2] << 2,
> + state->registers[(i * 2) + 1]);
> + }

I don't think we need the extra indentation here - something like

for (i = 0; i < state->nr_registers; i++) {
+   if (i == 0)
+   drm_puts(p, "Registers:\n");
drm_printf(p, " - { offset: 0x%04x, value: 0x%08x }\n",

would suffice since we won't go into the loop if state->nr_registers == 0.

Jordan

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-10 Thread Benjamin Gaignard
Le lun. 10 déc. 2018 à 12:10, Benjamin Gaignard
 a écrit :
>
> Le lun. 10 déc. 2018 à 11:24, Thierry Reding
>  a écrit :
> >
> > On Mon, Dec 10, 2018 at 11:11:33AM +0100, Daniel Vetter wrote:
> > > Having the probe helper stuff (which pretty much everyone needs) in
> > > the drm_crtc_helper.h file (which atomic drivers should never need) is
> > > confusing. Split them out.
> > >
> > > To make sure I actually achieved the goal here I went through all
> > > drivers. And indeed, all atomic drivers are now free of
> > > drm_crtc_helper.h includes.
> > >
>
> I have difficulties to apply this with git on top of drm-misc-next.
> It is because of that I got errors (encoder and connector types not
> found) while compiling adv7511_audio.c and exynos_dp.c ?
>

Nack on this patch because it break compiling at least on sti driver.
drm_probe_helper.h doesn't bring the same includes than drm_crtc_helper.h:
#include 
#include 
#include 
so some types, structures and functions proptotypes are missing while compiling.


> Benjamin
> > > Signed-off-by: Daniel Vetter 
> > > Cc: linux-arm-ker...@lists.infradead.org
> > > Cc: virtualizat...@lists.linux-foundation.org
> > > Cc: etna...@lists.freedesktop.org
> > > Cc: linux-samsung-...@vger.kernel.org
> > > Cc: intel-...@lists.freedesktop.org
> > > Cc: linux-media...@lists.infradead.org
> > > Cc: linux-amlo...@lists.infradead.org
> > > Cc: linux-arm-...@vger.kernel.org
> > > Cc: freedreno@lists.freedesktop.org
> > > Cc: nouv...@lists.freedesktop.org
> > > Cc: spice-de...@lists.freedesktop.org
> > > Cc: amd-...@lists.freedesktop.org
> > > Cc: linux-renesas-...@vger.kernel.org
> > > Cc: linux-rockc...@lists.infradead.org
> > > Cc: linux-st...@st-md-mailman.stormreply.com
> > > Cc: linux-te...@vger.kernel.org
> > > Cc: xen-de...@lists.xen.org
> > > ---
> > >  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c|  2 +-
> > >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
> > >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  2 +-
> > >  drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h  |  1 +
> > >  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
> > >  .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
> > >  .../display/amdgpu_dm/amdgpu_dm_services.c|  2 +-
> > >  drivers/gpu/drm/arc/arcpgu_crtc.c |  2 +-
> > >  drivers/gpu/drm/arc/arcpgu_drv.c  |  2 +-
> > >  drivers/gpu/drm/arc/arcpgu_sim.c  |  2 +-
> > >  drivers/gpu/drm/arm/hdlcd_crtc.c  |  2 +-
> > >  drivers/gpu/drm/arm/hdlcd_drv.c   |  2 +-
> > >  drivers/gpu/drm/arm/malidp_crtc.c |  2 +-
> > >  drivers/gpu/drm/arm/malidp_drv.c  |  2 +-
> > >  drivers/gpu/drm/arm/malidp_mw.c   |  2 +-
> > >  drivers/gpu/drm/armada/armada_510.c   |  2 +-
> > >  drivers/gpu/drm/armada/armada_crtc.c  |  2 +-
> > >  drivers/gpu/drm/armada/armada_drv.c   |  2 +-
> > >  drivers/gpu/drm/armada/armada_fb.c|  2 +-
> > >  drivers/gpu/drm/ast/ast_drv.c |  1 +
> > >  drivers/gpu/drm/ast/ast_mode.c|  1 +
> > >  .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c|  2 +-
> > >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
> > >  drivers/gpu/drm/bochs/bochs_drv.c |  1 +
> > >  drivers/gpu/drm/bochs/bochs_kms.c |  1 +
> > >  drivers/gpu/drm/bridge/adv7511/adv7511.h  |  2 +-
> > >  drivers/gpu/drm/bridge/analogix-anx78xx.c |  3 +-
> > >  .../drm/bridge/analogix/analogix_dp_core.c|  2 +-
> > >  drivers/gpu/drm/bridge/cdns-dsi.c |  2 +-
> > >  drivers/gpu/drm/bridge/dumb-vga-dac.c |  2 +-
> > >  .../bridge/megachips-stdp-ge-b850v3-fw.c  |  2 +-
> > >  drivers/gpu/drm/bridge/nxp-ptn3460.c  |  2 +-
> > >  drivers/gpu/drm/bridge/panel.c|  2 +-
> > >  drivers/gpu/drm/bridge/parade-ps8622.c|  2 +-
> > >  drivers/gpu/drm/bridge/sii902x.c  |  2 +-
> > >  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
> > >  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
> > >  drivers/gpu/drm/bridge/tc358764.c |  2 +-
> > >  drivers/gpu/drm/bridge/tc358767.c |  2 +-
> > >  drivers/gpu/drm/bridge/ti-sn65dsi86.c |  2 +-
> > >  drivers/gpu/drm/bridge/ti-tfp410.c|  2 +-
> > >  drivers/gpu/drm/cirrus/cirrus_drv.c   |  1 +
> > >  drivers/gpu/drm/cirrus/cirrus_mode.c  |  1 +
> > >  drivers/gpu/drm/drm_atomic_helper.c   |  1 -
> > >  drivers/gpu/drm/drm_dp_mst_topology.c |  2 +-
> > >  drivers/gpu/drm/drm_modeset_helper.c  |  2 +-
> > >  drivers/gpu/drm/drm_probe_helper.c|  2 +-
> > >  drivers/gpu/drm/drm_simple_kms_helper.c   |  2 +-
> > >  drivers/gpu/drm/etnaviv/etnaviv_drv.h |  1 -
> > >  drivers/gpu/drm/exynos/exynos_dp.c|  2 +-
> > >  drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  2 +-
> > >  drivers/gpu/drm/exynos/exynos_drm_dpi.c   |  2 +-
> > >  drivers/gpu/drm/exynos

Re: [Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-10 Thread Neil Armstrong
On 10/12/2018 11:11, Daniel Vetter wrote:
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
> 
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.
> 
> Signed-off-by: Daniel Vetter 
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: virtualizat...@lists.linux-foundation.org
> Cc: etna...@lists.freedesktop.org
> Cc: linux-samsung-...@vger.kernel.org
> Cc: intel-...@lists.freedesktop.org
> Cc: linux-media...@lists.infradead.org
> Cc: linux-amlo...@lists.infradead.org
> Cc: linux-arm-...@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: nouv...@lists.freedesktop.org
> Cc: spice-de...@lists.freedesktop.org
> Cc: amd-...@lists.freedesktop.org
> Cc: linux-renesas-...@vger.kernel.org
> Cc: linux-rockc...@lists.infradead.org
> Cc: linux-st...@st-md-mailman.stormreply.com
> Cc: linux-te...@vger.kernel.org
> Cc: xen-de...@lists.xen.org
> ---
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c|  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h  |  1 +
>  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
>  .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
>  .../display/amdgpu_dm/amdgpu_dm_services.c|  2 +-
>  drivers/gpu/drm/arc/arcpgu_crtc.c |  2 +-
>  drivers/gpu/drm/arc/arcpgu_drv.c  |  2 +-
>  drivers/gpu/drm/arc/arcpgu_sim.c  |  2 +-
>  drivers/gpu/drm/arm/hdlcd_crtc.c  |  2 +-
>  drivers/gpu/drm/arm/hdlcd_drv.c   |  2 +-
>  drivers/gpu/drm/arm/malidp_crtc.c |  2 +-
>  drivers/gpu/drm/arm/malidp_drv.c  |  2 +-
>  drivers/gpu/drm/arm/malidp_mw.c   |  2 +-
>  drivers/gpu/drm/armada/armada_510.c   |  2 +-
>  drivers/gpu/drm/armada/armada_crtc.c  |  2 +-
>  drivers/gpu/drm/armada/armada_drv.c   |  2 +-
>  drivers/gpu/drm/armada/armada_fb.c|  2 +-
>  drivers/gpu/drm/ast/ast_drv.c |  1 +
>  drivers/gpu/drm/ast/ast_mode.c|  1 +
>  .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c|  2 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
>  drivers/gpu/drm/bochs/bochs_drv.c |  1 +
>  drivers/gpu/drm/bochs/bochs_kms.c |  1 +
>  drivers/gpu/drm/bridge/adv7511/adv7511.h  |  2 +-
>  drivers/gpu/drm/bridge/analogix-anx78xx.c |  3 +-
>  .../drm/bridge/analogix/analogix_dp_core.c|  2 +-
>  drivers/gpu/drm/bridge/cdns-dsi.c |  2 +-
>  drivers/gpu/drm/bridge/dumb-vga-dac.c |  2 +-
>  .../bridge/megachips-stdp-ge-b850v3-fw.c  |  2 +-
>  drivers/gpu/drm/bridge/nxp-ptn3460.c  |  2 +-
>  drivers/gpu/drm/bridge/panel.c|  2 +-
>  drivers/gpu/drm/bridge/parade-ps8622.c|  2 +-
>  drivers/gpu/drm/bridge/sii902x.c  |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
>  drivers/gpu/drm/bridge/tc358764.c |  2 +-
>  drivers/gpu/drm/bridge/tc358767.c |  2 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c |  2 +-
>  drivers/gpu/drm/bridge/ti-tfp410.c|  2 +-
>  drivers/gpu/drm/cirrus/cirrus_drv.c   |  1 +
>  drivers/gpu/drm/cirrus/cirrus_mode.c  |  1 +
>  drivers/gpu/drm/drm_atomic_helper.c   |  1 -
>  drivers/gpu/drm/drm_dp_mst_topology.c |  2 +-
>  drivers/gpu/drm/drm_modeset_helper.c  |  2 +-
>  drivers/gpu/drm/drm_probe_helper.c|  2 +-
>  drivers/gpu/drm/drm_simple_kms_helper.c   |  2 +-
>  drivers/gpu/drm/etnaviv/etnaviv_drv.h |  1 -
>  drivers/gpu/drm/exynos/exynos_dp.c|  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_drv.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fb.c|  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  2 +-
>  drivers/gpu/drm/exynos/exynos_hdmi.c  |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c|  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c |  2 +-
>  drivers/gpu/drm/gma500/psb_intel_drv.h|  1 +
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c|  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  |  2 +-
>  drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c  |  2 +

[Freedreno] [PATCH 2/2] drm/msm/a6xx: Fix NULL dereference during crashstate capture

2018-12-10 Thread Sharat Masetty
The gpu crashstate's base objects registers pointer can be NULL if the
target implementation decides to capture the register dump on its own.
This patch simply checks for NULL before dereferencing.

Signed-off-by: Sharat Masetty 
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c 
b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 40bcf32..a39cebc 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -415,6 +415,9 @@ void adreno_gpu_state_get(struct msm_gpu *gpu, struct 
msm_gpu_state *state)
}
}
 
+   if (!adreno_gpu->registers)
+   return;
+
/* Count the number of registers */
for (i = 0; adreno_gpu->registers[i] != ~0; i += 2)
count += adreno_gpu->registers[i + 1] -
@@ -550,12 +553,14 @@ void adreno_show(struct msm_gpu *gpu, struct 
msm_gpu_state *state,
}
}
 
-   drm_puts(p, "registers:\n");
+   if (state->nr_registers > 0) {
+   drm_puts(p, "registers:\n");
 
-   for (i = 0; i < state->nr_registers; i++) {
-   drm_printf(p, "  - { offset: 0x%04x, value: 0x%08x }\n",
-   state->registers[i * 2] << 2,
-   state->registers[(i * 2) + 1]);
+   for (i = 0; i < state->nr_registers; i++) {
+   drm_printf(p, "  - { offset: 0x%04x, value: 0x%08x }\n",
+   state->registers[i * 2] << 2,
+   state->registers[(i * 2) + 1]);
+   }
}
 }
 #endif
-- 
1.9.1

___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 1/2] drm/msm/adreno: Make adreno_gpu_state_get() return void

2018-12-10 Thread Sharat Masetty
We are not really checking the state of the adreno_gpu_state_get()
function at the callers and in addition the state capture is mostly a
best effort service, so make the function return void.

Signed-off-by: Sharat Masetty 
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +---
 drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c 
b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 1ca4bea..40bcf32 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -380,7 +380,7 @@ bool adreno_idle(struct msm_gpu *gpu, struct msm_ringbuffer 
*ring)
return false;
 }
 
-int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
+void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
 {
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
int i, count = 0;
@@ -437,8 +437,6 @@ int adreno_gpu_state_get(struct msm_gpu *gpu, struct 
msm_gpu_state *state)
 
state->nr_registers = count;
}
-
-   return 0;
 }
 
 void adreno_gpu_state_destroy(struct msm_gpu_state *state)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h 
b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index 4973c8c..d4834b3 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -235,7 +235,7 @@ int adreno_gpu_init(struct drm_device *drm, struct 
platform_device *pdev,
 
 void adreno_gpu_state_destroy(struct msm_gpu_state *state);
 
-int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
+void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
 int adreno_gpu_state_put(struct msm_gpu_state *state);
 
 /* ringbuffer helpers (the parts that are adreno specific) */
-- 
1.9.1

___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-10 Thread Benjamin Gaignard
Le lun. 10 déc. 2018 à 11:24, Thierry Reding
 a écrit :
>
> On Mon, Dec 10, 2018 at 11:11:33AM +0100, Daniel Vetter wrote:
> > Having the probe helper stuff (which pretty much everyone needs) in
> > the drm_crtc_helper.h file (which atomic drivers should never need) is
> > confusing. Split them out.
> >
> > To make sure I actually achieved the goal here I went through all
> > drivers. And indeed, all atomic drivers are now free of
> > drm_crtc_helper.h includes.
> >

I have difficulties to apply this with git on top of drm-misc-next.
It is because of that I got errors (encoder and connector types not
found) while compiling adv7511_audio.c and exynos_dp.c ?

Benjamin
> > Signed-off-by: Daniel Vetter 
> > Cc: linux-arm-ker...@lists.infradead.org
> > Cc: virtualizat...@lists.linux-foundation.org
> > Cc: etna...@lists.freedesktop.org
> > Cc: linux-samsung-...@vger.kernel.org
> > Cc: intel-...@lists.freedesktop.org
> > Cc: linux-media...@lists.infradead.org
> > Cc: linux-amlo...@lists.infradead.org
> > Cc: linux-arm-...@vger.kernel.org
> > Cc: freedreno@lists.freedesktop.org
> > Cc: nouv...@lists.freedesktop.org
> > Cc: spice-de...@lists.freedesktop.org
> > Cc: amd-...@lists.freedesktop.org
> > Cc: linux-renesas-...@vger.kernel.org
> > Cc: linux-rockc...@lists.infradead.org
> > Cc: linux-st...@st-md-mailman.stormreply.com
> > Cc: linux-te...@vger.kernel.org
> > Cc: xen-de...@lists.xen.org
> > ---
> >  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c|  2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h  |  1 +
> >  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
> >  .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
> >  .../display/amdgpu_dm/amdgpu_dm_services.c|  2 +-
> >  drivers/gpu/drm/arc/arcpgu_crtc.c |  2 +-
> >  drivers/gpu/drm/arc/arcpgu_drv.c  |  2 +-
> >  drivers/gpu/drm/arc/arcpgu_sim.c  |  2 +-
> >  drivers/gpu/drm/arm/hdlcd_crtc.c  |  2 +-
> >  drivers/gpu/drm/arm/hdlcd_drv.c   |  2 +-
> >  drivers/gpu/drm/arm/malidp_crtc.c |  2 +-
> >  drivers/gpu/drm/arm/malidp_drv.c  |  2 +-
> >  drivers/gpu/drm/arm/malidp_mw.c   |  2 +-
> >  drivers/gpu/drm/armada/armada_510.c   |  2 +-
> >  drivers/gpu/drm/armada/armada_crtc.c  |  2 +-
> >  drivers/gpu/drm/armada/armada_drv.c   |  2 +-
> >  drivers/gpu/drm/armada/armada_fb.c|  2 +-
> >  drivers/gpu/drm/ast/ast_drv.c |  1 +
> >  drivers/gpu/drm/ast/ast_mode.c|  1 +
> >  .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c|  2 +-
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
> >  drivers/gpu/drm/bochs/bochs_drv.c |  1 +
> >  drivers/gpu/drm/bochs/bochs_kms.c |  1 +
> >  drivers/gpu/drm/bridge/adv7511/adv7511.h  |  2 +-
> >  drivers/gpu/drm/bridge/analogix-anx78xx.c |  3 +-
> >  .../drm/bridge/analogix/analogix_dp_core.c|  2 +-
> >  drivers/gpu/drm/bridge/cdns-dsi.c |  2 +-
> >  drivers/gpu/drm/bridge/dumb-vga-dac.c |  2 +-
> >  .../bridge/megachips-stdp-ge-b850v3-fw.c  |  2 +-
> >  drivers/gpu/drm/bridge/nxp-ptn3460.c  |  2 +-
> >  drivers/gpu/drm/bridge/panel.c|  2 +-
> >  drivers/gpu/drm/bridge/parade-ps8622.c|  2 +-
> >  drivers/gpu/drm/bridge/sii902x.c  |  2 +-
> >  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
> >  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
> >  drivers/gpu/drm/bridge/tc358764.c |  2 +-
> >  drivers/gpu/drm/bridge/tc358767.c |  2 +-
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c |  2 +-
> >  drivers/gpu/drm/bridge/ti-tfp410.c|  2 +-
> >  drivers/gpu/drm/cirrus/cirrus_drv.c   |  1 +
> >  drivers/gpu/drm/cirrus/cirrus_mode.c  |  1 +
> >  drivers/gpu/drm/drm_atomic_helper.c   |  1 -
> >  drivers/gpu/drm/drm_dp_mst_topology.c |  2 +-
> >  drivers/gpu/drm/drm_modeset_helper.c  |  2 +-
> >  drivers/gpu/drm/drm_probe_helper.c|  2 +-
> >  drivers/gpu/drm/drm_simple_kms_helper.c   |  2 +-
> >  drivers/gpu/drm/etnaviv/etnaviv_drv.h |  1 -
> >  drivers/gpu/drm/exynos/exynos_dp.c|  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_dpi.c   |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_drv.c   |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_dsi.c   |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_fb.c|  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_fbdev.c |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  2 +-
> >  drivers/gpu/drm/exynos/exynos_hdmi.c  |  2 +-
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c|  2 +-
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c |  2 +-
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 

Re: [Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-10 Thread Thierry Reding
On Mon, Dec 10, 2018 at 11:11:33AM +0100, Daniel Vetter wrote:
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
> 
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.
> 
> Signed-off-by: Daniel Vetter 
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: virtualizat...@lists.linux-foundation.org
> Cc: etna...@lists.freedesktop.org
> Cc: linux-samsung-...@vger.kernel.org
> Cc: intel-...@lists.freedesktop.org
> Cc: linux-media...@lists.infradead.org
> Cc: linux-amlo...@lists.infradead.org
> Cc: linux-arm-...@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: nouv...@lists.freedesktop.org
> Cc: spice-de...@lists.freedesktop.org
> Cc: amd-...@lists.freedesktop.org
> Cc: linux-renesas-...@vger.kernel.org
> Cc: linux-rockc...@lists.infradead.org
> Cc: linux-st...@st-md-mailman.stormreply.com
> Cc: linux-te...@vger.kernel.org
> Cc: xen-de...@lists.xen.org
> ---
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c|  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h  |  1 +
>  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
>  .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
>  .../display/amdgpu_dm/amdgpu_dm_services.c|  2 +-
>  drivers/gpu/drm/arc/arcpgu_crtc.c |  2 +-
>  drivers/gpu/drm/arc/arcpgu_drv.c  |  2 +-
>  drivers/gpu/drm/arc/arcpgu_sim.c  |  2 +-
>  drivers/gpu/drm/arm/hdlcd_crtc.c  |  2 +-
>  drivers/gpu/drm/arm/hdlcd_drv.c   |  2 +-
>  drivers/gpu/drm/arm/malidp_crtc.c |  2 +-
>  drivers/gpu/drm/arm/malidp_drv.c  |  2 +-
>  drivers/gpu/drm/arm/malidp_mw.c   |  2 +-
>  drivers/gpu/drm/armada/armada_510.c   |  2 +-
>  drivers/gpu/drm/armada/armada_crtc.c  |  2 +-
>  drivers/gpu/drm/armada/armada_drv.c   |  2 +-
>  drivers/gpu/drm/armada/armada_fb.c|  2 +-
>  drivers/gpu/drm/ast/ast_drv.c |  1 +
>  drivers/gpu/drm/ast/ast_mode.c|  1 +
>  .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c|  2 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
>  drivers/gpu/drm/bochs/bochs_drv.c |  1 +
>  drivers/gpu/drm/bochs/bochs_kms.c |  1 +
>  drivers/gpu/drm/bridge/adv7511/adv7511.h  |  2 +-
>  drivers/gpu/drm/bridge/analogix-anx78xx.c |  3 +-
>  .../drm/bridge/analogix/analogix_dp_core.c|  2 +-
>  drivers/gpu/drm/bridge/cdns-dsi.c |  2 +-
>  drivers/gpu/drm/bridge/dumb-vga-dac.c |  2 +-
>  .../bridge/megachips-stdp-ge-b850v3-fw.c  |  2 +-
>  drivers/gpu/drm/bridge/nxp-ptn3460.c  |  2 +-
>  drivers/gpu/drm/bridge/panel.c|  2 +-
>  drivers/gpu/drm/bridge/parade-ps8622.c|  2 +-
>  drivers/gpu/drm/bridge/sii902x.c  |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
>  drivers/gpu/drm/bridge/tc358764.c |  2 +-
>  drivers/gpu/drm/bridge/tc358767.c |  2 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c |  2 +-
>  drivers/gpu/drm/bridge/ti-tfp410.c|  2 +-
>  drivers/gpu/drm/cirrus/cirrus_drv.c   |  1 +
>  drivers/gpu/drm/cirrus/cirrus_mode.c  |  1 +
>  drivers/gpu/drm/drm_atomic_helper.c   |  1 -
>  drivers/gpu/drm/drm_dp_mst_topology.c |  2 +-
>  drivers/gpu/drm/drm_modeset_helper.c  |  2 +-
>  drivers/gpu/drm/drm_probe_helper.c|  2 +-
>  drivers/gpu/drm/drm_simple_kms_helper.c   |  2 +-
>  drivers/gpu/drm/etnaviv/etnaviv_drv.h |  1 -
>  drivers/gpu/drm/exynos/exynos_dp.c|  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_drv.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c   |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fb.c|  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  2 +-
>  drivers/gpu/drm/exynos/exynos_hdmi.c  |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c|  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c |  2 +-
>  drivers/gpu/drm/gma500/psb_intel_drv.h|  1 +
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c|  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  |  2 +-
>  drivers/gpu/drm/hisilicon/kirin

[Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-10 Thread Daniel Vetter
Having the probe helper stuff (which pretty much everyone needs) in
the drm_crtc_helper.h file (which atomic drivers should never need) is
confusing. Split them out.

To make sure I actually achieved the goal here I went through all
drivers. And indeed, all atomic drivers are now free of
drm_crtc_helper.h includes.

Signed-off-by: Daniel Vetter 
Cc: linux-arm-ker...@lists.infradead.org
Cc: virtualizat...@lists.linux-foundation.org
Cc: etna...@lists.freedesktop.org
Cc: linux-samsung-...@vger.kernel.org
Cc: intel-...@lists.freedesktop.org
Cc: linux-media...@lists.infradead.org
Cc: linux-amlo...@lists.infradead.org
Cc: linux-arm-...@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Cc: spice-de...@lists.freedesktop.org
Cc: amd-...@lists.freedesktop.org
Cc: linux-renesas-...@vger.kernel.org
Cc: linux-rockc...@lists.infradead.org
Cc: linux-st...@st-md-mailman.stormreply.com
Cc: linux-te...@vger.kernel.org
Cc: xen-de...@lists.xen.org
---
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h  |  1 +
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
 .../display/amdgpu_dm/amdgpu_dm_services.c|  2 +-
 drivers/gpu/drm/arc/arcpgu_crtc.c |  2 +-
 drivers/gpu/drm/arc/arcpgu_drv.c  |  2 +-
 drivers/gpu/drm/arc/arcpgu_sim.c  |  2 +-
 drivers/gpu/drm/arm/hdlcd_crtc.c  |  2 +-
 drivers/gpu/drm/arm/hdlcd_drv.c   |  2 +-
 drivers/gpu/drm/arm/malidp_crtc.c |  2 +-
 drivers/gpu/drm/arm/malidp_drv.c  |  2 +-
 drivers/gpu/drm/arm/malidp_mw.c   |  2 +-
 drivers/gpu/drm/armada/armada_510.c   |  2 +-
 drivers/gpu/drm/armada/armada_crtc.c  |  2 +-
 drivers/gpu/drm/armada/armada_drv.c   |  2 +-
 drivers/gpu/drm/armada/armada_fb.c|  2 +-
 drivers/gpu/drm/ast/ast_drv.c |  1 +
 drivers/gpu/drm/ast/ast_mode.c|  1 +
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c|  2 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
 drivers/gpu/drm/bochs/bochs_drv.c |  1 +
 drivers/gpu/drm/bochs/bochs_kms.c |  1 +
 drivers/gpu/drm/bridge/adv7511/adv7511.h  |  2 +-
 drivers/gpu/drm/bridge/analogix-anx78xx.c |  3 +-
 .../drm/bridge/analogix/analogix_dp_core.c|  2 +-
 drivers/gpu/drm/bridge/cdns-dsi.c |  2 +-
 drivers/gpu/drm/bridge/dumb-vga-dac.c |  2 +-
 .../bridge/megachips-stdp-ge-b850v3-fw.c  |  2 +-
 drivers/gpu/drm/bridge/nxp-ptn3460.c  |  2 +-
 drivers/gpu/drm/bridge/panel.c|  2 +-
 drivers/gpu/drm/bridge/parade-ps8622.c|  2 +-
 drivers/gpu/drm/bridge/sii902x.c  |  2 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
 drivers/gpu/drm/bridge/tc358764.c |  2 +-
 drivers/gpu/drm/bridge/tc358767.c |  2 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c |  2 +-
 drivers/gpu/drm/bridge/ti-tfp410.c|  2 +-
 drivers/gpu/drm/cirrus/cirrus_drv.c   |  1 +
 drivers/gpu/drm/cirrus/cirrus_mode.c  |  1 +
 drivers/gpu/drm/drm_atomic_helper.c   |  1 -
 drivers/gpu/drm/drm_dp_mst_topology.c |  2 +-
 drivers/gpu/drm/drm_modeset_helper.c  |  2 +-
 drivers/gpu/drm/drm_probe_helper.c|  2 +-
 drivers/gpu/drm/drm_simple_kms_helper.c   |  2 +-
 drivers/gpu/drm/etnaviv/etnaviv_drv.h |  1 -
 drivers/gpu/drm/exynos/exynos_dp.c|  2 +-
 drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_dpi.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_dsi.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fb.c|  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  2 +-
 drivers/gpu/drm/exynos/exynos_hdmi.c  |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c|  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c |  2 +-
 drivers/gpu/drm/gma500/psb_intel_drv.h|  1 +
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c|  2 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c |  2 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  |  2 +-
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c  |  2 +-
 .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c   |  2 +-
 .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c   |  2 +-
 drivers/gpu/drm/i2c/ch7006_priv.h |  2 +-
 drivers/gpu/drm/i2c/sil164_drv.c  |  2 +-
 drivers/gpu

[Freedreno] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-10 Thread Daniel Vetter
Having the probe helper stuff (which pretty much everyone needs) in
the drm_crtc_helper.h file (which atomic drivers should never need) is
confusing. Split them out.

To make sure I actually achieved the goal here I went through all
drivers. And indeed, all atomic drivers are now free of
drm_crtc_helper.h includes.

Signed-off-by: Daniel Vetter 
Cc: linux-arm-ker...@lists.infradead.org
Cc: virtualizat...@lists.linux-foundation.org
Cc: etna...@lists.freedesktop.org
Cc: linux-samsung-...@vger.kernel.org
Cc: intel-...@lists.freedesktop.org
Cc: linux-media...@lists.infradead.org
Cc: linux-amlo...@lists.infradead.org
Cc: linux-arm-...@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Cc: spice-de...@lists.freedesktop.org
Cc: amd-...@lists.freedesktop.org
Cc: linux-renesas-...@vger.kernel.org
Cc: linux-rockc...@lists.infradead.org
Cc: linux-st...@st-md-mailman.stormreply.com
Cc: linux-te...@vger.kernel.org
Cc: xen-de...@lists.xen.org
---
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h  |  1 +
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
 .../display/amdgpu_dm/amdgpu_dm_services.c|  2 +-
 drivers/gpu/drm/arc/arcpgu_crtc.c |  2 +-
 drivers/gpu/drm/arc/arcpgu_drv.c  |  2 +-
 drivers/gpu/drm/arc/arcpgu_sim.c  |  2 +-
 drivers/gpu/drm/arm/hdlcd_crtc.c  |  2 +-
 drivers/gpu/drm/arm/hdlcd_drv.c   |  2 +-
 drivers/gpu/drm/arm/malidp_crtc.c |  2 +-
 drivers/gpu/drm/arm/malidp_drv.c  |  2 +-
 drivers/gpu/drm/arm/malidp_mw.c   |  2 +-
 drivers/gpu/drm/armada/armada_510.c   |  2 +-
 drivers/gpu/drm/armada/armada_crtc.c  |  2 +-
 drivers/gpu/drm/armada/armada_drv.c   |  2 +-
 drivers/gpu/drm/armada/armada_fb.c|  2 +-
 drivers/gpu/drm/ast/ast_drv.c |  1 +
 drivers/gpu/drm/ast/ast_mode.c|  1 +
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c|  2 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
 drivers/gpu/drm/bochs/bochs_drv.c |  1 +
 drivers/gpu/drm/bochs/bochs_kms.c |  1 +
 drivers/gpu/drm/bridge/adv7511/adv7511.h  |  2 +-
 drivers/gpu/drm/bridge/analogix-anx78xx.c |  3 +-
 .../drm/bridge/analogix/analogix_dp_core.c|  2 +-
 drivers/gpu/drm/bridge/cdns-dsi.c |  2 +-
 drivers/gpu/drm/bridge/dumb-vga-dac.c |  2 +-
 .../bridge/megachips-stdp-ge-b850v3-fw.c  |  2 +-
 drivers/gpu/drm/bridge/nxp-ptn3460.c  |  2 +-
 drivers/gpu/drm/bridge/panel.c|  2 +-
 drivers/gpu/drm/bridge/parade-ps8622.c|  2 +-
 drivers/gpu/drm/bridge/sii902x.c  |  2 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
 drivers/gpu/drm/bridge/tc358764.c |  2 +-
 drivers/gpu/drm/bridge/tc358767.c |  2 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c |  2 +-
 drivers/gpu/drm/bridge/ti-tfp410.c|  2 +-
 drivers/gpu/drm/cirrus/cirrus_drv.c   |  1 +
 drivers/gpu/drm/cirrus/cirrus_mode.c  |  1 +
 drivers/gpu/drm/drm_atomic_helper.c   |  1 -
 drivers/gpu/drm/drm_dp_mst_topology.c |  2 +-
 drivers/gpu/drm/drm_modeset_helper.c  |  2 +-
 drivers/gpu/drm/drm_probe_helper.c|  2 +-
 drivers/gpu/drm/drm_simple_kms_helper.c   |  2 +-
 drivers/gpu/drm/etnaviv/etnaviv_drv.h |  1 -
 drivers/gpu/drm/exynos/exynos_dp.c|  2 +-
 drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_dpi.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_dsi.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fb.c|  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  2 +-
 drivers/gpu/drm/exynos/exynos_hdmi.c  |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c|  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c |  2 +-
 drivers/gpu/drm/gma500/psb_intel_drv.h|  1 +
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c|  2 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c |  2 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  |  2 +-
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c  |  2 +-
 .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c   |  2 +-
 .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c   |  2 +-
 drivers/gpu/drm/i2c/ch7006_priv.h |  2 +-
 drivers/gpu/drm/i2c/sil164_drv.c  |  2 +-
 drivers/gpu