dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
To: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [DPU PATCH 2/2] drm/msm: Add hardware catalog file for SDM845
Date: Tue, 20 Mar 2018 19:13:38 +0530	[thread overview]
Message-ID: <a4863676581e8a25f13233a65a387ae4@codeaurora.org> (raw)
In-Reply-To: <20180319135931.GJ223881@art_vandelay>

On 2018-03-19 19:29, Sean Paul wrote:
> On Wed, Mar 14, 2018 at 11:21:38AM +0530, Sravanthi Kollukuduru wrote:
>> This change adds the hardware catalog information in driver source
>> for SDM845. This removes the current logic of dt based parsing
>> of target catalog information.
>> 
>> Signed-off-by: Sravanthi Kollukuduru <skolluku@codeaurora.org>
>> ---
>>  drivers/gpu/drm/msm/Makefile                       |    1 +
>>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     | 3071 
>> +-------------------
>>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h     |   17 +-
>>  .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog_sdm845.c  |  744 +++++
>>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |    2 +-
>>  5 files changed, 767 insertions(+), 3068 deletions(-)
> 
> Hi Sravanthi,
> Thank you for the patch, it's great to see diffstats like this :)
> 
> <snip />
> 
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_sdm845.c 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_sdm845.c
>> new file mode 100644
>> index 0000000..3ca5dc7
>> --- /dev/null
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_sdm845.c
>> @@ -0,0 +1,744 @@
>> +/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
>> + *
>> + * This program is free software; you can redistribute it and/or 
>> modify
>> + * it under the terms of the GNU General Public License version 2 and
>> + * only version 2 as published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
> 
> We should be using SPDX license tags from now on.
> 
>> + */
>> +
>> +#include "dpu_hw_catalog.h"
>> +#include "dpu_hw_catalog_format.h"
>> +#include "dpu_hw_mdss.h"
>> +#include "dpu_hwio.h"
>> +
>> +/* VIG layer capability */
>> +#define VIG_40X_MASK \
>> +	(BIT(DPU_SSPP_SRC) | BIT(DPU_SSPP_SCALER_QSEED3) | BIT(DPU_SSPP_QOS) 
>> |\
>> +	BIT(DPU_SSPP_CSC_10BIT) | BIT(DPU_SSPP_CDP) | BIT(DPU_SSPP_QOS_8LVL) 
>> |\
>> +	BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_EXCL_RECT))
>> +
>> +/* DMA layer capability */
>> +#define DMA_40X_MASK \
>> +	(BIT(DPU_SSPP_SRC) | BIT(DPU_SSPP_QOS) | BIT(DPU_SSPP_QOS_8LVL) |\
>> +	BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_CDP) | 
>> BIT(DPU_SSPP_EXCL_RECT))
>> +
>> +#define MIXER_40X_MASK \
>> +	(BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER))
>> +
>> +#define DSPP_40X_MASK \
>> +	(BIT(DPU_DSPP_IGC) | BIT(DPU_DSPP_PCC) | BIT(DPU_DSPP_GC) |\
>> +	BIT(DPU_DSPP_HSIC) | BIT(DPU_DSPP_GAMUT) | BIT(DPU_DSPP_HIST) |\
>> +	BIT(DPU_DSPP_MEMCOLOR) | BIT(DPU_DSPP_SIXZONE) | BIT(DPU_DSPP_VLUT))
>> +
>> +#define DSPP_AD_40X_MASK \
>> +	(DSPP_40X_MASK | BIT(DPU_DSPP_AD))
>> +
>> +#define PINGPONG_40X_MASK BIT(DPU_PINGPONG_DITHER)
>> +
>> +#define PINGPONG_40X_SPLIT_MASK \
>> +	(PINGPONG_40X_MASK | BIT(DPU_PINGPONG_SPLIT) | 
>> BIT(DPU_PINGPONG_TE2))
>> +
>> +#define WB2_40X_MASK \
>> +	(BIT(DPU_WB_LINE_MODE) | BIT(DPU_WB_TRAFFIC_SHAPER) | 
>> BIT(DPU_WB_CDP) |\
>> +	BIT(DPU_WB_YUV_CONFIG) | BIT(DPU_WB_QOS_8LVL) | BIT(DPU_WB_UBWC))
>> +
>> +#define DECIMATION_40X_MAX_H	4
>> +#define DECIMATION_40X_MAX_V	4
>> +
>> +/*
>> + * set_cfg_xxx_init(): populate dpu sub-blocks reg offsets
>> + * and instance counts.
>> + */
>> +static inline int set_cfg_40X_init(struct dpu_mdss_cfg *dpu_cfg)
>> +{
>> +	/* Layer capability */
>> +	static const struct dpu_sspp_sub_blks vig_sblk_0 = {
>> +		.maxlinewidth = 2560,
>> +		.pixel_ram_size = 50 * 1024,
>> +		.maxdwnscale = 4,
>> +		.maxupscale = 20,
>> +		.maxhdeciexp = DECIMATION_40X_MAX_H,
>> +		.maxvdeciexp = DECIMATION_40X_MAX_V,
>> +		.smart_dma_priority = 5,
>> +		.src_blk = {.name = "sspp_src_0", .id = DPU_SSPP_SRC,
>> +			.base = 0x00, .len = 0x150,},
>> +		.scaler_blk = {.name = "sspp_scaler0",
>> +			.id = DPU_SSPP_SCALER_QSEED3,
>> +			.base = 0xa00, .len = 0xa0,},
>> +		.csc_blk = {.name = "sspp_csc0", .id = DPU_SSPP_CSC_10BIT,
>> +			.base = 0x1a00, .len = 0x100,},
>> +		.format_list = plane_formats_yuv,
>> +		.virt_format_list = plane_formats,
>> +	};
> 
> Instead of locating all of these parameters in one file, these should 
> be
> located in their respective driver file. It also seems like you could 
> separate
> out the common stuff such as line width, ram size, scaling, format, etc
> parameters from the pipeline setup.
> 
> The same comments apply to the other blocks. Move things into the 
> drivers,
> use compatibility string to determine the version, and then associate 
> the common
> parameters with of_device_id.data.
> 
> Sean
> 
> <snip />

Thanks Sean for the feedback.
The idea behind this approach is to maintain a one point access for all 
the
target specific information, analogous to the current dpu dtsi file.
This also ensures easy maintenance for different hardware versions, as 
all it
takes is to add another file instead of updating across individual sub 
block files.

Also, i'm not quite clear on how compatibility strings is applicable to 
sub blocks.
Please clarify.

Thanks,
Sravanthi
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  reply	other threads:[~2018-03-20 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  5:51 [DPU PATCH 0/2] Add hardware catalog information in driver source for SDM845 Sravanthi Kollukuduru
2018-03-14  5:51 ` [DPU PATCH 1/2] dt-bindings: msm/disp: Remove hw block offset DT entries " Sravanthi Kollukuduru
     [not found]   ` <1521006698-23703-2-git-send-email-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-03-18 12:49     ` Rob Herring
2018-03-19  6:19       ` skolluku
2018-03-29 15:04         ` Rob Herring
     [not found]           ` <CAL_Jsq+d8wvrX9myO4JN6WcuSmuERRNC_uyMEzQCkSxfB5qpVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-29 15:28             ` Sean Paul
     [not found] ` <1521006698-23703-1-git-send-email-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-03-14  5:51   ` [DPU PATCH 2/2] drm/msm: Add hardware catalog file " Sravanthi Kollukuduru
2018-03-19 13:59     ` Sean Paul
2018-03-20 13:43       ` skolluku-sgV2jX0FEOL9JmXXK+q4OQ [this message]
     [not found]         ` <a4863676581e8a25f13233a65a387ae4-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-03-20 15:17           ` Sean Paul
2018-03-21 10:35             ` skolluku-sgV2jX0FEOL9JmXXK+q4OQ
2018-03-21 13:52               ` [Freedreno] " Sean Paul

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=a4863676581e8a25f13233a65a387ae4@codeaurora.org \
    --to=skolluku-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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;
as well as URLs for NNTP newsgroup(s).