devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: CK Hu <ck.hu@mediatek.com>
To: Stu Hsieh <stu.hsieh@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Rob Herring <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 8/8] drm/mediatek: add third ddp path
Date: Mon, 28 May 2018 10:50:15 +0800	[thread overview]
Message-ID: <1527475815.31089.0.camel@mtksdaap41> (raw)
In-Reply-To: <1527474417.11190.21.camel@mtksdccf07>

Hi, Stu:

On Mon, 2018-05-28 at 10:26 +0800, Stu Hsieh wrote:
> Hi, CK:
> I've some idea as below.
> 
> On Fri, 2018-05-25 at 13:00 +0800, CK Hu wrote:
> > Hi, Stu:
> > 
> > On Fri, 2018-05-25 at 10:34 +0800, stu.hsieh@mediatek.com wrote:
> > > From: Stu Hsieh <stu.hsieh@mediatek.com>
> > > 
> > > This patch create third crtc by third ddp path
> > > 
> > 
> > Apply this patch before the patch 'Add support for mediatek SOC MT2712'
> > because this patch is necessary for mt2712.
> > 
> > > Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com>
> > > ---
> > >  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > > index b32c4cc8d051..3a866e1d6af4 100644
> > > --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > > @@ -267,6 +267,11 @@ static int mtk_drm_kms_init(struct drm_device *drm)
> > >  	if (ret < 0)
> > >  		goto err_component_unbind;
> > >  
> > > +	ret = mtk_drm_crtc_create(drm, private->data->third_path,
> > > +				  private->data->third_len);
> > 
> > I think you should prevent doing this for mt8173 and mt2701 because that
> > two SoC has only two ddp path.
> 
> Now, 8173 and 2701 have only two ddp path, there is a problem on run
> time. 
> There are three crtc for drm resource, and there is nothing in third
> crtc. 
> Because 8173 and 2701 have no third ddp, and the third ddp_len is zero.
> So, I want to add the condition like following in mtk_crtc_create()
> if (path_len == 0)
> 	return 0;
> 
> Then, the valur ret is zero and it would not create the null third crtc.

This sounds good to me.

Regards,
CK

> 
> 
> Regards,
> Stu
> 
> > 
> > Regards,
> > CK
> > 
> > > +	if (ret < 0)
> > > +		goto err_component_unbind;
> > > +
> > >  	/* Use OVL device for all DMA memory allocations */
> > >  	np = private->comp_node[private->data->main_path[0]] ?:
> > >  	     private->comp_node[private->data->ext_path[0]];
> > 
> > 
> 
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2018-05-28  2:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25  2:34 [PATCH v3 0/8] Add support for mediatek SOC MT2712 stu.hsieh
2018-05-25  2:34 ` [PATCH v3 1/8] drm/mediatek: update dt-bindings for mt2712 stu.hsieh
2018-05-25  3:18   ` CK Hu
2018-05-25  9:20     ` Stu Hsieh
2018-05-25  2:34 ` [PATCH v3 2/8] drm/mediatek: support maximum 64 mutex mod stu.hsieh
2018-05-25  3:24   ` CK Hu
2018-05-25  2:34 ` [PATCH v3 3/8] drm/mediatek: add connection from OD1 to RDMA1 stu.hsieh
2018-05-25  3:26   ` CK Hu
2018-05-25  9:36     ` Stu Hsieh
2018-05-25  2:34 ` [PATCH v3 4/8] drm/mediatek: add ddp component AAL1 stu.hsieh
2018-05-25  4:23   ` CK Hu
2018-05-25  9:25     ` Stu Hsieh
2018-05-25  2:34 ` [PATCH v3 5/8] drm/mediatek: add ddp component OD1 stu.hsieh
2018-05-25  2:34 ` [PATCH v3 6/8] drm/mediatek: add ddp component PWM2 stu.hsieh
2018-05-25  2:34 ` [PATCH v3 7/8] drm/mediatek: Add support for mediatek SOC MT2712 stu.hsieh
2018-05-25  4:51   ` CK Hu
2018-05-25  9:33     ` Stu Hsieh
2018-05-25 16:12   ` kbuild test robot
2018-05-25  2:34 ` [PATCH v3 8/8] drm/mediatek: add third ddp path stu.hsieh
2018-05-25  5:00   ` CK Hu
2018-05-28  2:26     ` Stu Hsieh
2018-05-28  2:50       ` CK Hu [this message]

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=1527475815.31089.0.camel@mtksdaap41 \
    --to=ck.hu@mediatek.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=stu.hsieh@mediatek.com \
    /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).