All of lore.kernel.org
 help / color / mirror / Atom feed
From: CK Hu <ck.hu@mediatek.com>
To: Evan Benn <evanbenn@chromium.org>
Cc: <dri-devel@lists.freedesktop.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	<linux-kernel@vger.kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-mediatek@lists.infradead.org>,
	David Airlie <airlied@linux.ie>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it
Date: Mon, 10 Feb 2020 10:53:07 +0800	[thread overview]
Message-ID: <1581303187.951.2.camel@mtksdaap41> (raw)
In-Reply-To: <1581064499.590.0.camel@mtksdaap41>

Hi, Evan:

On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote:
> Hi, Evan:
> 
> On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote:
> > The cursor and primary planes were hard coded.
> > Now search for them for passing to drm_crtc_init_with_planes
> > 
> 
> Reviewed-by: CK Hu <ck.hu@mediatek.com>

Applied to mediatek-drm-fixes-5.6 [1], thanks.

[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6

Regards,
CK

> 
> > Signed-off-by: Evan Benn <evanbenn@chromium.org>
> > ---
> > 
> >  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > index 7b392d6c71cc..935652990afa 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > @@ -658,10 +658,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {
> >  
> >  static int mtk_drm_crtc_init(struct drm_device *drm,
> >  			     struct mtk_drm_crtc *mtk_crtc,
> > -			     struct drm_plane *primary,
> > -			     struct drm_plane *cursor, unsigned int pipe)
> > +			     unsigned int pipe)
> >  {
> > -	int ret;
> > +	struct drm_plane *primary = NULL;
> > +	struct drm_plane *cursor = NULL;
> > +	int i, ret;
> > +
> > +	for (i = 0; i < mtk_crtc->layer_nr; i++) {
> > +		if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_PRIMARY)
> > +			primary = &mtk_crtc->planes[i];
> > +		else if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_CURSOR)
> > +			cursor = &mtk_crtc->planes[i];
> > +	}
> >  
> >  	ret = drm_crtc_init_with_planes(drm, &mtk_crtc->base, primary, cursor,
> >  					&mtk_crtc_funcs, NULL);
> > @@ -830,9 +838,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> >  			return ret;
> >  	}
> >  
> > -	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0],
> > -				mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] :
> > -				NULL, pipe);
> > +	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, pipe);
> >  	if (ret < 0)
> >  		return ret;
> >  
> 


WARNING: multiple messages have this Message-ID (diff)
From: CK Hu <ck.hu@mediatek.com>
To: Evan Benn <evanbenn@chromium.org>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it
Date: Mon, 10 Feb 2020 10:53:07 +0800	[thread overview]
Message-ID: <1581303187.951.2.camel@mtksdaap41> (raw)
In-Reply-To: <1581064499.590.0.camel@mtksdaap41>

Hi, Evan:

On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote:
> Hi, Evan:
> 
> On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote:
> > The cursor and primary planes were hard coded.
> > Now search for them for passing to drm_crtc_init_with_planes
> > 
> 
> Reviewed-by: CK Hu <ck.hu@mediatek.com>

Applied to mediatek-drm-fixes-5.6 [1], thanks.

[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6

Regards,
CK

> 
> > Signed-off-by: Evan Benn <evanbenn@chromium.org>
> > ---
> > 
> >  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > index 7b392d6c71cc..935652990afa 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > @@ -658,10 +658,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {
> >  
> >  static int mtk_drm_crtc_init(struct drm_device *drm,
> >  			     struct mtk_drm_crtc *mtk_crtc,
> > -			     struct drm_plane *primary,
> > -			     struct drm_plane *cursor, unsigned int pipe)
> > +			     unsigned int pipe)
> >  {
> > -	int ret;
> > +	struct drm_plane *primary = NULL;
> > +	struct drm_plane *cursor = NULL;
> > +	int i, ret;
> > +
> > +	for (i = 0; i < mtk_crtc->layer_nr; i++) {
> > +		if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_PRIMARY)
> > +			primary = &mtk_crtc->planes[i];
> > +		else if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_CURSOR)
> > +			cursor = &mtk_crtc->planes[i];
> > +	}
> >  
> >  	ret = drm_crtc_init_with_planes(drm, &mtk_crtc->base, primary, cursor,
> >  					&mtk_crtc_funcs, NULL);
> > @@ -830,9 +838,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> >  			return ret;
> >  	}
> >  
> > -	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0],
> > -				mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] :
> > -				NULL, pipe);
> > +	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, pipe);
> >  	if (ret < 0)
> >  		return ret;
> >  
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: CK Hu <ck.hu@mediatek.com>
To: Evan Benn <evanbenn@chromium.org>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it
Date: Mon, 10 Feb 2020 10:53:07 +0800	[thread overview]
Message-ID: <1581303187.951.2.camel@mtksdaap41> (raw)
In-Reply-To: <1581064499.590.0.camel@mtksdaap41>

Hi, Evan:

On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote:
> Hi, Evan:
> 
> On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote:
> > The cursor and primary planes were hard coded.
> > Now search for them for passing to drm_crtc_init_with_planes
> > 
> 
> Reviewed-by: CK Hu <ck.hu@mediatek.com>

Applied to mediatek-drm-fixes-5.6 [1], thanks.

[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6

Regards,
CK

> 
> > Signed-off-by: Evan Benn <evanbenn@chromium.org>
> > ---
> > 
> >  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > index 7b392d6c71cc..935652990afa 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > @@ -658,10 +658,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {
> >  
> >  static int mtk_drm_crtc_init(struct drm_device *drm,
> >  			     struct mtk_drm_crtc *mtk_crtc,
> > -			     struct drm_plane *primary,
> > -			     struct drm_plane *cursor, unsigned int pipe)
> > +			     unsigned int pipe)
> >  {
> > -	int ret;
> > +	struct drm_plane *primary = NULL;
> > +	struct drm_plane *cursor = NULL;
> > +	int i, ret;
> > +
> > +	for (i = 0; i < mtk_crtc->layer_nr; i++) {
> > +		if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_PRIMARY)
> > +			primary = &mtk_crtc->planes[i];
> > +		else if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_CURSOR)
> > +			cursor = &mtk_crtc->planes[i];
> > +	}
> >  
> >  	ret = drm_crtc_init_with_planes(drm, &mtk_crtc->base, primary, cursor,
> >  					&mtk_crtc_funcs, NULL);
> > @@ -830,9 +838,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> >  			return ret;
> >  	}
> >  
> > -	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0],
> > -				mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] :
> > -				NULL, pipe);
> > +	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, pipe);
> >  	if (ret < 0)
> >  		return ret;
> >  
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: CK Hu <ck.hu@mediatek.com>
To: Evan Benn <evanbenn@chromium.org>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it
Date: Mon, 10 Feb 2020 10:53:07 +0800	[thread overview]
Message-ID: <1581303187.951.2.camel@mtksdaap41> (raw)
In-Reply-To: <1581064499.590.0.camel@mtksdaap41>

Hi, Evan:

On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote:
> Hi, Evan:
> 
> On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote:
> > The cursor and primary planes were hard coded.
> > Now search for them for passing to drm_crtc_init_with_planes
> > 
> 
> Reviewed-by: CK Hu <ck.hu@mediatek.com>

Applied to mediatek-drm-fixes-5.6 [1], thanks.

[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6

Regards,
CK

> 
> > Signed-off-by: Evan Benn <evanbenn@chromium.org>
> > ---
> > 
> >  drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > index 7b392d6c71cc..935652990afa 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > @@ -658,10 +658,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {
> >  
> >  static int mtk_drm_crtc_init(struct drm_device *drm,
> >  			     struct mtk_drm_crtc *mtk_crtc,
> > -			     struct drm_plane *primary,
> > -			     struct drm_plane *cursor, unsigned int pipe)
> > +			     unsigned int pipe)
> >  {
> > -	int ret;
> > +	struct drm_plane *primary = NULL;
> > +	struct drm_plane *cursor = NULL;
> > +	int i, ret;
> > +
> > +	for (i = 0; i < mtk_crtc->layer_nr; i++) {
> > +		if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_PRIMARY)
> > +			primary = &mtk_crtc->planes[i];
> > +		else if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_CURSOR)
> > +			cursor = &mtk_crtc->planes[i];
> > +	}
> >  
> >  	ret = drm_crtc_init_with_planes(drm, &mtk_crtc->base, primary, cursor,
> >  					&mtk_crtc_funcs, NULL);
> > @@ -830,9 +838,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> >  			return ret;
> >  	}
> >  
> > -	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0],
> > -				mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] :
> > -				NULL, pipe);
> > +	ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, pipe);
> >  	if (ret < 0)
> >  		return ret;
> >  
> 

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

  reply	other threads:[~2020-02-10  2:53 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 19:24 [PATCH] drm/mediatek: Ensure the cursor plane is on top of other overlays Sean Paul
2020-01-30 19:24 ` Sean Paul
2020-01-30 19:24 ` Sean Paul
2020-01-31  3:27 ` CK Hu
2020-01-31  3:27   ` CK Hu
2020-01-31  3:27   ` CK Hu
2020-02-06  6:59   ` evanbenn
2020-02-06  6:59     ` evanbenn
2020-02-06  6:59     ` evanbenn
2020-02-06  7:04     ` Evan Benn
2020-02-06  7:04       ` Evan Benn
2020-02-06  7:04       ` Evan Benn
2020-02-06  7:16     ` CK Hu
2020-02-06  7:16       ` CK Hu
2020-02-06  7:16       ` CK Hu
2020-02-06 14:01     ` Sean Paul
2020-02-06 14:01       ` Sean Paul
2020-02-06 14:01       ` Sean Paul
2020-02-07  4:23       ` [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it Evan Benn
2020-02-07  4:23         ` Evan Benn
2020-02-07  4:23         ` Evan Benn
2020-02-07  4:23         ` Evan Benn
2020-02-07  4:52         ` Evan Benn
2020-02-07  4:52           ` Evan Benn
2020-02-07  4:52           ` Evan Benn
2020-02-07  4:52           ` Evan Benn
2020-02-07  8:34         ` CK Hu
2020-02-07  8:34           ` CK Hu
2020-02-07  8:34           ` CK Hu
2020-02-07  8:34           ` CK Hu
2020-02-10  2:53           ` CK Hu [this message]
2020-02-10  2:53             ` CK Hu
2020-02-10  2:53             ` CK Hu
2020-02-10  2:53             ` CK Hu
2020-02-10 14:10             ` Sean Paul
2020-02-10 14:10               ` Sean Paul
2020-02-10 14:10               ` Sean Paul
2020-02-10 14:10               ` Sean Paul
2020-02-11  1:19               ` CK Hu
2020-02-11  1:19                 ` CK Hu
2020-02-11  1:19                 ` CK Hu
2020-02-11  1:19                 ` CK Hu
2020-02-07 17:28         ` Sean Paul
2020-02-07 17:28           ` Sean Paul
2020-02-07 17:28           ` Sean Paul
2020-02-07 17:28           ` Sean Paul
2020-02-10  2:51   ` [PATCH] drm/mediatek: Ensure the cursor plane is on top of other overlays CK Hu
2020-02-10  2:51     ` CK Hu
2020-02-10  2:51     ` CK Hu

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=1581303187.951.2.camel@mtksdaap41 \
    --to=ck.hu@mediatek.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=evanbenn@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.