[Freedreno] [DPU PATCH 3/3] drm/msm: Fix dpu build warnings
ryadav at codeaurora.org
ryadav at codeaurora.org
Thu Apr 5 05:07:47 UTC 2018
On 2018-04-03 01:40, Sean Paul wrote:
> A bunch of warning fixes, build is clean now.
Some of the changes done in this patch are unique and were not present
in previous patch series to fix dpu driver warnings.
Please consider refactoring this patch a bit to include the remaining
valid fixes.
Thanks,
Rajesh
>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_connector.c | 7 ++++---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c | 4 ++--
> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 -
> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 1 -
> drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 2 +-
> drivers/gpu/drm/msm/dpu_dbg.c | 2 +-
> 7 files changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_connector.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_connector.c
> index 36607e36672d..a57495f95663 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_connector.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_connector.c
> @@ -32,9 +32,6 @@
>
> #define DPU_ERROR_CONN(c, fmt, ...) DPU_ERROR("conn%d " fmt,\
> (c) ? (c)->base.base.id : -1, ##__VA_ARGS__)
> -static u32 dither_matrix[DITHER_MATRIX_SZ] = {
> - 15, 7, 13, 5, 3, 11, 1, 9, 12, 4, 14, 6, 0, 8, 2, 10
> -};
>
> static const struct drm_prop_enum_list e_topology_name[] = {
> {DPU_RM_TOPOLOGY_NONE, "dpu_none"},
> @@ -226,6 +223,10 @@ void dpu_connector_unregister_event(struct
> drm_connector *connector,
> }
>
> #ifdef CONFIG_DRM_MSM_DSI_STAGING
> +static u32 dither_matrix[DITHER_MATRIX_SZ] = {
> + 15, 7, 13, 5, 3, 11, 1, 9, 12, 4, 14, 6, 0, 8, 2, 10
> +};
> +
This change is valid.
> static int _dpu_connector_get_default_dither_cfg_v1(
> struct dpu_connector *c_conn, void *cfg)
> {
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 3308929bc9d6..b0c170373632 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -2587,7 +2587,7 @@ static void dpu_crtc_disable(struct drm_crtc
> *crtc)
> struct dpu_crtc_irq_info *node = NULL;
> struct drm_event event;
> u32 power_on;
> - int ret, i;
> + int ret;
>
> if (!crtc || !crtc->dev || !crtc->dev->dev_private || !crtc->state) {
> DPU_ERROR("invalid crtc\n");
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
> index bb4547748ce9..e0d46c545c14 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
> @@ -374,7 +374,7 @@ static int validate_dma_cfg(struct
> dpu_reg_dma_setup_ops_cfg *cfg)
> }
>
> if (cfg->dma_buf->iova & GUARD_BYTES || !cfg->dma_buf->vaddr) {
> - DRM_ERROR("iova not aligned to %zx iova %x kva %pK",
> + DRM_ERROR("iova not aligned to %zx iova %llx kva %pK",
> ADDR_ALIGN, cfg->dma_buf->iova,
> cfg->dma_buf->vaddr);
> return -EINVAL;
> @@ -433,7 +433,7 @@ static int validate_kick_off_v1(struct
> dpu_reg_dma_kickoff_cfg *cfg)
> (WRITE_TRIGGER);
>
> if (cfg->dma_buf->iova & GUARD_BYTES) {
> - DRM_ERROR("Address is not aligned to %zx iova %x", ADDR_ALIGN,
> + DRM_ERROR("Address is not aligned to %zx iova %llx", ADDR_ALIGN,
> cfg->dma_buf->iova);
> return -EINVAL;
> }
This was address in
https://lists.freedesktop.org/archives/freedreno/2018-March/001944.html
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 36657aa97bd7..aad5a94c726a 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -426,7 +426,6 @@ static void dpu_kms_commit(struct msm_kms *kms,
> struct drm_atomic_state *state)
> {
> struct drm_crtc *crtc;
> struct drm_crtc_state *crtc_state;
> - struct dpu_crtc_state *cstate;
> int i;
>
> for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 33a894e3d580..7844d6463220 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -2742,7 +2742,6 @@ dpu_plane_duplicate_state(struct drm_plane
> *plane)
> struct dpu_plane *pdpu;
> struct dpu_plane_state *pstate;
> struct dpu_plane_state *old_state;
> - struct drm_property *drm_prop;
>
> if (!plane) {
> DPU_ERROR("invalid plane\n");
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
> index 801155fe0989..074223383a98 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
> @@ -321,7 +321,7 @@ void dpu_debugfs_vbif_destroy(struct dpu_kms
> *dpu_kms)
>
> int dpu_debugfs_vbif_init(struct dpu_kms *dpu_kms, struct dentry
> *debugfs_root)
> {
> - char vbif_name[32];
> + char vbif_name[64];
This change is valid.
> struct dentry *debugfs_vbif;
> int i, j;
>
> diff --git a/drivers/gpu/drm/msm/dpu_dbg.c
> b/drivers/gpu/drm/msm/dpu_dbg.c
> index 8118fb72645a..8322b1cb89c9 100644
> --- a/drivers/gpu/drm/msm/dpu_dbg.c
> +++ b/drivers/gpu/drm/msm/dpu_dbg.c
> @@ -3043,7 +3043,7 @@ int dpu_dbg_debugfs_register(struct dentry
> *debugfs_root)
> {
> static struct dpu_dbg_base *dbg = &dpu_dbg_base;
> struct dpu_dbg_reg_base *blk_base;
> - char debug_name[80] = "";
> + char debug_name[88] = "";
This change is valid.
>
> if (!debugfs_root)
> return -EINVAL;
More information about the Freedreno
mailing list