[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJppNjBCx2NDe4zS_41hEUBiiXcuG63frJ7E67A5M9-FSzg@mail.gmail.com>
Date: Wed, 6 Dec 2023 11:11:44 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Rob Clark <robdclark@...il.com>
Cc: dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
linux-arm-msm@...r.kernel.org, Rob Clark <robdclark@...omium.org>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Johan Hovold <johan+linaro@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] drm/msm/adreno: Split catalog into separate files
On Wed, 6 Dec 2023 at 00:06, Rob Clark <robdclark@...il.com> wrote:
>
> From: Rob Clark <robdclark@...omium.org>
>
> Split each gen's gpu table into it's own file. Only code-motion, no
> functional change.
>
> Signed-off-by: Rob Clark <robdclark@...omium.org>
> ---
> drivers/gpu/drm/msm/Makefile | 5 +
> drivers/gpu/drm/msm/adreno/a2xx_catalog.c | 53 ++
> drivers/gpu/drm/msm/adreno/a3xx_catalog.c | 75 +++
> drivers/gpu/drm/msm/adreno/a4xx_catalog.c | 51 ++
> drivers/gpu/drm/msm/adreno/a5xx_catalog.c | 145 ++++++
> drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 285 +++++++++++
> drivers/gpu/drm/msm/adreno/adreno_device.c | 570 +--------------------
> 7 files changed, 620 insertions(+), 564 deletions(-)
> create mode 100644 drivers/gpu/drm/msm/adreno/a2xx_catalog.c
> create mode 100644 drivers/gpu/drm/msm/adreno/a3xx_catalog.c
> create mode 100644 drivers/gpu/drm/msm/adreno/a4xx_catalog.c
> create mode 100644 drivers/gpu/drm/msm/adreno/a5xx_catalog.c
> create mode 100644 drivers/gpu/drm/msm/adreno/a6xx_catalog.c
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
>
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 49671364fdcf..32f2fd980452 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -7,12 +7,17 @@ ccflags-$(CONFIG_DRM_MSM_DP) += -I $(srctree)/$(src)/dp
> msm-y := \
> adreno/adreno_device.o \
> adreno/adreno_gpu.o \
> + adreno/a2xx_catalog.o \
> adreno/a2xx_gpu.o \
> + adreno/a3xx_catalog.o \
> adreno/a3xx_gpu.o \
> + adreno/a4xx_catalog.o \
> adreno/a4xx_gpu.o \
> + adreno/a5xx_catalog.o \
> adreno/a5xx_gpu.o \
> adreno/a5xx_power.o \
> adreno/a5xx_preempt.o \
> + adreno/a6xx_catalog.o \
> adreno/a6xx_gpu.o \
> adreno/a6xx_gmu.o \
> adreno/a6xx_hfi.o \
> diff --git a/drivers/gpu/drm/msm/adreno/a2xx_catalog.c b/drivers/gpu/drm/msm/adreno/a2xx_catalog.c
> new file mode 100644
> index 000000000000..1a4d182279fc
> --- /dev/null
> +++ b/drivers/gpu/drm/msm/adreno/a2xx_catalog.c
> @@ -0,0 +1,53 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2013-2014 Red Hat
> + * Author: Rob Clark <robdclark@...il.com>
> + *
> + * Copyright (c) 2014,2017 The Linux Foundation. All rights reserved.
> + */
> +
> +#include "adreno_gpu.h"
> +
> +const struct adreno_info a2xx_gpus[] = {
> + {
> + .chip_ids = ADRENO_CHIP_IDS(0x02000000),
> + .family = ADRENO_2XX_GEN1,
> + .revn = 200,
> + .fw = {
> + [ADRENO_FW_PM4] = "yamato_pm4.fw",
> + [ADRENO_FW_PFP] = "yamato_pfp.fw",
> + },
> + .gmem = SZ_256K,
> + .inactive_period = DRM_MSM_INACTIVE_PERIOD,
> + .init = a2xx_gpu_init,
> + }, { /* a200 on i.mx51 has only 128kib gmem */
> + .chip_ids = ADRENO_CHIP_IDS(0x02000001),
> + .family = ADRENO_2XX_GEN1,
> + .revn = 201,
> + .fw = {
> + [ADRENO_FW_PM4] = "yamato_pm4.fw",
> + [ADRENO_FW_PFP] = "yamato_pfp.fw",
> + },
> + .gmem = SZ_128K,
> + .inactive_period = DRM_MSM_INACTIVE_PERIOD,
> + .init = a2xx_gpu_init,
> + }, {
> + .chip_ids = ADRENO_CHIP_IDS(0x02020000),
> + .family = ADRENO_2XX_GEN2,
> + .revn = 220,
> + .fw = {
> + [ADRENO_FW_PM4] = "leia_pm4_470.fw",
> + [ADRENO_FW_PFP] = "leia_pfp_470.fw",
> + },
> + .gmem = SZ_512K,
> + .inactive_period = DRM_MSM_INACTIVE_PERIOD,
> + .init = a2xx_gpu_init,
> + }, {
> + /* sentinal */
> + }
> +};
> +
> +MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
> +MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> +MODULE_FIRMWARE("qcom/yamato_pfp.fw");
> +MODULE_FIRMWARE("qcom/yamato_pm4.fw");
> \ No newline at end of file
Nit: you might want to fix newlines (here and in other catalog files).
--
With best wishes
Dmitry
Powered by blists - more mailing lists