Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Bjorn Andersson <andersson@kernel.org>,
	<linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 11/12] drm/msm: merge dpu format database to MDP formats
Date: Fri, 12 Apr 2024 12:47:22 -0700	[thread overview]
Message-ID: <6ed5bb25-979e-bb48-3dfe-4af581bb5dd1@quicinc.com> (raw)
In-Reply-To: <20231202214016.1257621-12-dmitry.baryshkov@linaro.org>



On 12/2/2023 1:40 PM, Dmitry Baryshkov wrote:
> Finally remove duplication between DPU and generic MDP code by merging
> DPU format lists to the MDP format database.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c  |   2 +-
>   .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c   |   4 +-
>   drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c   | 602 ------------------
>   drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h   |  23 -
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h   |  10 -
>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c       |   2 +-
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c     |   3 +-
>   drivers/gpu/drm/msm/disp/mdp_format.c         | 595 +++++++++++++++--
>   drivers/gpu/drm/msm/disp/mdp_kms.h            |   2 -
>   drivers/gpu/drm/msm/msm_drv.h                 |  12 +
>   10 files changed, 549 insertions(+), 706 deletions(-)
> 

I cross-checked a few macros visually (not each one) and it LGTM in 
terms of just moving it from dpu_formats.c to mdp_format.c

Even in this change I had the same concern about whether to use MDP for 
dpu formats.

But I think even if we make it MSM_*** then we will have to keep them in 
some msm_** header and not mdp_format.c

So lets go ahead with the MDP naming which you have. If we see its not 
working out later on, please be open to a mass renaming that time.

<snip>

> index dea6d47854fe..e7651a0e878c 100644
> --- a/drivers/gpu/drm/msm/msm_drv.h
> +++ b/drivers/gpu/drm/msm/msm_drv.h
> @@ -267,6 +267,16 @@ enum msm_format_flags {
>   #define MSM_FORMAT_FLAG_UNPACK_ALIGN_MSB BIT(MSM_FORMAT_FLAG_UNPACK_ALIGN_MSB_BIT)
>   #define MSM_FORMAT_FLAG_ALPHA_ENABLE	BIT(MSM_FORMAT_FLAG_ALPHA_ENABLE_BIT)
>   
> +/**
> + * DPU HW,Component order color map
> + */
> +enum {
> +	C0_G_Y = 0,
> +	C1_B_Cb = 1,
> +	C2_R_Cr = 2,
> +	C3_ALPHA = 3
> +};
> +
>   /**
>    * struct msm_format: defines the format configuration
>    * @pixel_format: format fourcc
> @@ -305,6 +315,8 @@ struct msm_format {
>   	(((X)->fetch_mode == MDP_FETCH_UBWC) && \
>   	 ((X)->flags & MSM_FORMAT_FLAG_COMPRESSED))
>   
> +const struct msm_format *mdp_get_format(struct msm_kms *kms, uint32_t format, uint64_t modifier);
> +
>   struct msm_pending_timer;
>   
>   int msm_atomic_init_pending_timer(struct msm_pending_timer *timer,

I am now thinking that do you think it makes sense to move all 
MDP_FORMAT macros to a new mdp_formats.h including the RGB/YUV bitfield 
macros (even though I already acked that change).

Instead of bloating msm_drv.h even more?

  reply	other threads:[~2024-04-12 19:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 21:40 [PATCH 00/12] drm/msm: fold dpu_format into mdp_formats database Dmitry Baryshkov
2023-12-02 21:40 ` [PATCH 01/12] drm/msm: fix BPC1 -> BPC4 Dmitry Baryshkov
2024-04-10 19:15   ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 02/12] drm/msm/disp: add mdp_fetch_mode enum Dmitry Baryshkov
2024-04-10 19:19   ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 03/12] drm/msm/dpu: use format-related definitions from mdp_common.xml.h Dmitry Baryshkov
2024-04-10 20:00   ` Abhinav Kumar
2024-04-10 20:16     ` Dmitry Baryshkov
2024-04-10 20:18       ` Abhinav Kumar
2024-04-10 21:12         ` Dmitry Baryshkov
2024-04-10 23:54           ` Abhinav Kumar
2024-04-11  1:20             ` Dmitry Baryshkov
2024-04-11  1:21               ` Dmitry Baryshkov
2024-04-11  2:38             ` Dmitry Baryshkov
2024-04-19 20:59               ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 04/12] drm/msm: add arrays listing formats supported by MDP4/MDP5 hardware Dmitry Baryshkov
2024-04-19 21:06   ` Abhinav Kumar
2024-04-19 21:21     ` Dmitry Baryshkov
2024-04-19 21:57       ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 05/12] drm/msm/dpu: in dpu_format replace bitmap with unsigned long field Dmitry Baryshkov
2024-04-10 20:40   ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 06/12] drm/msm/dpu: pull format flag definitions to msm_drv.h Dmitry Baryshkov
2024-04-11 18:41   ` Abhinav Kumar
2024-04-11 18:42     ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 07/12] drm/msm: merge dpu_format and mdp_format in struct msm_format Dmitry Baryshkov
2024-04-11 19:15   ` Abhinav Kumar
2024-04-11 19:17     ` Dmitry Baryshkov
2023-12-02 21:40 ` [PATCH 08/12] drm/msm: convert msm_format::unpack_tight to the flag Dmitry Baryshkov
2024-04-11 21:02   ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 09/12] drm/msm: convert msm_format::unpack_align_msb " Dmitry Baryshkov
2024-04-11 21:13   ` Abhinav Kumar
2023-12-02 21:40 ` [PATCH 10/12] drm/msm: convert msm_format::alpha_enable " Dmitry Baryshkov
2024-04-11 21:20   ` Abhinav Kumar
2024-04-11 21:42     ` Dmitry Baryshkov
2023-12-02 21:40 ` [PATCH 11/12] drm/msm: merge dpu format database to MDP formats Dmitry Baryshkov
2024-04-12 19:47   ` Abhinav Kumar [this message]
2024-04-13  6:02     ` Dmitry Baryshkov
2023-12-02 21:40 ` [PATCH 12/12] drm/msm: drop msm_kms_funcs::get_format() callback Dmitry Baryshkov
2024-04-12 21:40   ` Abhinav Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ed5bb25-979e-bb48-3dfe-4af581bb5dd1@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox