[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56afb74961dab35946922ec5fed91502@codeaurora.org>
Date: Mon, 23 Nov 2020 13:23:25 -0800
From: abhinavk@...eaurora.org
To: Lee Jones <lee.jones@...aro.org>
Cc: linux-kernel@...r.kernel.org, Rob Clark <robdclark@...il.com>,
Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, linux-arm-msm@...r.kernel.org,
dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org
Subject: Re: [PATCH 14/40] drm/msm/disp/dpu1/dpu_hw_catalog: Move definitions
to the only place they are used
On 2020-11-23 03:18, Lee Jones wrote:
> These tables are not large or overbearing, so moving them into the
> source file seems like the right thing to do. The alternative is to
> use __maybe_unused, which is undesirable.
>
> Fixes the following W=1 kernel build warning(s):
>
> In file included from
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:11:
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:7:23: warning:
> ‘qcom_compressed_supported_formats’ defined but not used
> [-Wunused-const-variable=]
> 7 | static const uint32_t qcom_compressed_supported_formats[] = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:48:23: warning:
> ‘plane_formats_yuv’ defined but not used [-Wunused-const-variable=]
> 48 | static const uint32_t plane_formats_yuv[] = {
> | ^~~~~~~~~~~~~~~~~
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:17:23: warning:
> ‘plane_formats’ defined but not used [-Wunused-const-variable=]
> 17 | static const uint32_t plane_formats[] = {
> | ^~~~~~~~~~~~~
>
> Cc: Rob Clark <robdclark@...il.com>
> Cc: Sean Paul <sean@...rly.run>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: linux-arm-msm@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org
> Cc: freedreno@...ts.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
I think this is reasonable,
Reviewed-by: Abhinav Kumar <abhinavk@...eaurora.org>
> ---
> .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 74 +++++++++++++++-
> .../drm/msm/disp/dpu1/dpu_hw_catalog_format.h | 88 -------------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 11 ++-
> 3 files changed, 83 insertions(+), 90 deletions(-)
> delete mode 100644
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> index a7004f18523b0..9ed6d0c6cd9b2 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> @@ -8,7 +8,6 @@
> #include <linux/platform_device.h>
> #include "dpu_hw_mdss.h"
> #include "dpu_hw_catalog.h"
> -#include "dpu_hw_catalog_format.h"
> #include "dpu_kms.h"
>
> #define VIG_MASK \
> @@ -62,6 +61,79 @@
>
> #define STRCAT(X, Y) (X Y)
>
> +static const uint32_t plane_formats[] = {
> + DRM_FORMAT_ARGB8888,
> + DRM_FORMAT_ABGR8888,
> + DRM_FORMAT_RGBA8888,
> + DRM_FORMAT_BGRA8888,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_RGBX8888,
> + DRM_FORMAT_BGRX8888,
> + DRM_FORMAT_XBGR8888,
> + DRM_FORMAT_RGB888,
> + DRM_FORMAT_BGR888,
> + DRM_FORMAT_RGB565,
> + DRM_FORMAT_BGR565,
> + DRM_FORMAT_ARGB1555,
> + DRM_FORMAT_ABGR1555,
> + DRM_FORMAT_RGBA5551,
> + DRM_FORMAT_BGRA5551,
> + DRM_FORMAT_XRGB1555,
> + DRM_FORMAT_XBGR1555,
> + DRM_FORMAT_RGBX5551,
> + DRM_FORMAT_BGRX5551,
> + DRM_FORMAT_ARGB4444,
> + DRM_FORMAT_ABGR4444,
> + DRM_FORMAT_RGBA4444,
> + DRM_FORMAT_BGRA4444,
> + DRM_FORMAT_XRGB4444,
> + DRM_FORMAT_XBGR4444,
> + DRM_FORMAT_RGBX4444,
> + DRM_FORMAT_BGRX4444,
> +};
> +
> +static const uint32_t plane_formats_yuv[] = {
> + DRM_FORMAT_ARGB8888,
> + DRM_FORMAT_ABGR8888,
> + DRM_FORMAT_RGBA8888,
> + DRM_FORMAT_BGRX8888,
> + DRM_FORMAT_BGRA8888,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_XBGR8888,
> + DRM_FORMAT_RGBX8888,
> + DRM_FORMAT_RGB888,
> + DRM_FORMAT_BGR888,
> + DRM_FORMAT_RGB565,
> + DRM_FORMAT_BGR565,
> + DRM_FORMAT_ARGB1555,
> + DRM_FORMAT_ABGR1555,
> + DRM_FORMAT_RGBA5551,
> + DRM_FORMAT_BGRA5551,
> + DRM_FORMAT_XRGB1555,
> + DRM_FORMAT_XBGR1555,
> + DRM_FORMAT_RGBX5551,
> + DRM_FORMAT_BGRX5551,
> + DRM_FORMAT_ARGB4444,
> + DRM_FORMAT_ABGR4444,
> + DRM_FORMAT_RGBA4444,
> + DRM_FORMAT_BGRA4444,
> + DRM_FORMAT_XRGB4444,
> + DRM_FORMAT_XBGR4444,
> + DRM_FORMAT_RGBX4444,
> + DRM_FORMAT_BGRX4444,
> +
> + DRM_FORMAT_NV12,
> + DRM_FORMAT_NV21,
> + DRM_FORMAT_NV16,
> + DRM_FORMAT_NV61,
> + DRM_FORMAT_VYUY,
> + DRM_FORMAT_UYVY,
> + DRM_FORMAT_YUYV,
> + DRM_FORMAT_YVYU,
> + DRM_FORMAT_YUV420,
> + DRM_FORMAT_YVU420,
> +};
> +
> /*************************************************************
> * DPU sub blocks config
> *************************************************************/
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h
> deleted file mode 100644
> index 3766f0fd0bf08..0000000000000
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h
> +++ /dev/null
> @@ -1,88 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-only */
> -/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
> - */
> -
> -#include "dpu_hw_mdss.h"
> -
> -static const uint32_t qcom_compressed_supported_formats[] = {
> - DRM_FORMAT_ABGR8888,
> - DRM_FORMAT_ARGB8888,
> - DRM_FORMAT_XBGR8888,
> - DRM_FORMAT_XRGB8888,
> - DRM_FORMAT_BGR565,
> -
> - DRM_FORMAT_NV12,
> -};
> -
> -static const uint32_t plane_formats[] = {
> - DRM_FORMAT_ARGB8888,
> - DRM_FORMAT_ABGR8888,
> - DRM_FORMAT_RGBA8888,
> - DRM_FORMAT_BGRA8888,
> - DRM_FORMAT_XRGB8888,
> - DRM_FORMAT_RGBX8888,
> - DRM_FORMAT_BGRX8888,
> - DRM_FORMAT_XBGR8888,
> - DRM_FORMAT_RGB888,
> - DRM_FORMAT_BGR888,
> - DRM_FORMAT_RGB565,
> - DRM_FORMAT_BGR565,
> - DRM_FORMAT_ARGB1555,
> - DRM_FORMAT_ABGR1555,
> - DRM_FORMAT_RGBA5551,
> - DRM_FORMAT_BGRA5551,
> - DRM_FORMAT_XRGB1555,
> - DRM_FORMAT_XBGR1555,
> - DRM_FORMAT_RGBX5551,
> - DRM_FORMAT_BGRX5551,
> - DRM_FORMAT_ARGB4444,
> - DRM_FORMAT_ABGR4444,
> - DRM_FORMAT_RGBA4444,
> - DRM_FORMAT_BGRA4444,
> - DRM_FORMAT_XRGB4444,
> - DRM_FORMAT_XBGR4444,
> - DRM_FORMAT_RGBX4444,
> - DRM_FORMAT_BGRX4444,
> -};
> -
> -static const uint32_t plane_formats_yuv[] = {
> - DRM_FORMAT_ARGB8888,
> - DRM_FORMAT_ABGR8888,
> - DRM_FORMAT_RGBA8888,
> - DRM_FORMAT_BGRX8888,
> - DRM_FORMAT_BGRA8888,
> - DRM_FORMAT_XRGB8888,
> - DRM_FORMAT_XBGR8888,
> - DRM_FORMAT_RGBX8888,
> - DRM_FORMAT_RGB888,
> - DRM_FORMAT_BGR888,
> - DRM_FORMAT_RGB565,
> - DRM_FORMAT_BGR565,
> - DRM_FORMAT_ARGB1555,
> - DRM_FORMAT_ABGR1555,
> - DRM_FORMAT_RGBA5551,
> - DRM_FORMAT_BGRA5551,
> - DRM_FORMAT_XRGB1555,
> - DRM_FORMAT_XBGR1555,
> - DRM_FORMAT_RGBX5551,
> - DRM_FORMAT_BGRX5551,
> - DRM_FORMAT_ARGB4444,
> - DRM_FORMAT_ABGR4444,
> - DRM_FORMAT_RGBA4444,
> - DRM_FORMAT_BGRA4444,
> - DRM_FORMAT_XRGB4444,
> - DRM_FORMAT_XBGR4444,
> - DRM_FORMAT_RGBX4444,
> - DRM_FORMAT_BGRX4444,
> -
> - DRM_FORMAT_NV12,
> - DRM_FORMAT_NV21,
> - DRM_FORMAT_NV16,
> - DRM_FORMAT_NV61,
> - DRM_FORMAT_VYUY,
> - DRM_FORMAT_UYVY,
> - DRM_FORMAT_YUYV,
> - DRM_FORMAT_YVYU,
> - DRM_FORMAT_YUV420,
> - DRM_FORMAT_YVU420,
> -};
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 7ea90d25a3b69..c0b1d77369e53 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -19,7 +19,6 @@
> #include "dpu_kms.h"
> #include "dpu_formats.h"
> #include "dpu_hw_sspp.h"
> -#include "dpu_hw_catalog_format.h"
> #include "dpu_trace.h"
> #include "dpu_crtc.h"
> #include "dpu_vbif.h"
> @@ -63,6 +62,16 @@ enum {
>
> #define DEFAULT_REFRESH_RATE 60
>
> +static const uint32_t qcom_compressed_supported_formats[] = {
> + DRM_FORMAT_ABGR8888,
> + DRM_FORMAT_ARGB8888,
> + DRM_FORMAT_XBGR8888,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_BGR565,
> +
> + DRM_FORMAT_NV12,
> +};
> +
> /**
> * enum dpu_plane_qos - Different qos configurations for each pipe
> *
Powered by blists - more mailing lists