All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ayan Halder <ayan.halder@arm.com>
To: Ville Syrj?l? <ville.syrjala@linux.intel.com>
Cc: liviu.dudau@arm.com, brian.starkey@arm.com, gustavo@padovan.org,
	maarten.lankhorst@linux.intel.com, seanpaul@chromium.org,
	airlied@linux.ie, jani.nikula@linux.intel.com,
	joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
	intel-gfx@lists.freedesktop.org, hjc@rock-chips.com,
	heiko@sntech.de, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com,
	sre@kernel.org, bparrot@ti.com, peter.ujfalusi@ti.com,
	afd@ti.com, dri-devel@lists.freedesktop.org,
	maxime.ripard@bootlin.com, wens@csie.org, malidp@foss.arm.com,
	nd@arm.com
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/sun4i: Substitute sun4i_backend_format_is_yuv() with format->is_yuv
Date: Wed, 18 Jul 2018 15:40:51 +0100	[thread overview]
Message-ID: <20180718144050.GA2056@arm.com> (raw)
In-Reply-To: <20180718101540.GT5565@intel.com>

On Wed, Jul 18, 2018 at 01:15:40PM +0300, Ville Syrj?l? wrote:

Hi Ville,
> On Tue, Jul 17, 2018 at 06:13:46PM +0100, Ayan Kumar Halder wrote:
> > drm_format_info table has a field 'is_yuv' to denote if the format
> > is yuv or not. The driver is expected to use this instead of
> > having a function for the same purpose.
> > 
> > Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com>
> > ---
> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > index de0a76d..d7950b5 100644
> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > @@ -86,12 +86,6 @@ static inline bool sun4i_backend_format_is_packed_yuv422(uint32_t format)
> >  	}
> >  }
> >  
> > -static inline bool sun4i_backend_format_is_yuv(uint32_t format)
> > -{
> > -	return sun4i_backend_format_is_planar_yuv(format) ||
> > -		sun4i_backend_format_is_packed_yuv422(format);
> > -}
> 
> sun4i_backend_format_is_planar_yuv() is now unused so could be nuked.
> Also the one remaining use of sun4i_backend_format_is_packed_yuv422()
> could be replaced with 'is_yuv && num_planes == 1', so that one could
> be easily killed off ass well.

I will have this in a separate patch.
> > -
> >  static void sun4i_backend_apply_color_correction(struct sunxi_engine *engine)
> >  {
> >  	int i;
> > @@ -304,7 +298,7 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend,
> >  			   SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA_EN,
> >  			   val);
> >  
> > -	if (sun4i_backend_format_is_yuv(fb->format->format))
> > +	if (fb->format->is_yuv)
> >  		return sun4i_backend_update_yuv_format(backend, layer, plane);
> >  
> >  	ret = sun4i_backend_drm_format_to_layer(fb->format->format, &val);
> > @@ -384,7 +378,7 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
> >  	 */
> >  	paddr -= PHYS_OFFSET;
> >  
> > -	if (sun4i_backend_format_is_yuv(fb->format->format))
> > +	if (fb->format->is_yuv)
> >  		return sun4i_backend_update_yuv_buffer(backend, fb, paddr);
> >  
> >  	/* Write the 32 lower bits of the address (in bits) */
> > @@ -502,7 +496,7 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
> >  		if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE))
> >  			num_alpha_planes++;
> >  
> > -		if (sun4i_backend_format_is_yuv(fb->format->format)) {
> > +		if (fb->format->is_yuv) {
> >  			DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
> >  			num_yuv_planes++;
> >  		}
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrj?l?
> Intel

WARNING: multiple messages have this Message-ID (diff)
From: Ayan Halder <ayan.halder@arm.com>
To: Ville Syrj?l? <ville.syrjala@linux.intel.com>
Cc: airlied@linux.ie, liviu.dudau@arm.com,
	dri-devel@lists.freedesktop.org, peter.ujfalusi@ti.com,
	laurent.pinchart@ideasonboard.com, afd@ti.com,
	maxime.ripard@bootlin.com, linux-rockchip@lists.infradead.org,
	wens@csie.org, tomi.valkeinen@ti.com, malidp@foss.arm.com,
	intel-gfx@lists.freedesktop.org, rodrigo.vivi@intel.com,
	nd@arm.com, linux-arm-kernel@lists.infradead.org, sre@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/sun4i: Substitute sun4i_backend_format_is_yuv() with format->is_yuv
Date: Wed, 18 Jul 2018 15:40:51 +0100	[thread overview]
Message-ID: <20180718144050.GA2056@arm.com> (raw)
In-Reply-To: <20180718101540.GT5565@intel.com>

On Wed, Jul 18, 2018 at 01:15:40PM +0300, Ville Syrj?l? wrote:

Hi Ville,
> On Tue, Jul 17, 2018 at 06:13:46PM +0100, Ayan Kumar Halder wrote:
> > drm_format_info table has a field 'is_yuv' to denote if the format
> > is yuv or not. The driver is expected to use this instead of
> > having a function for the same purpose.
> > 
> > Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com>
> > ---
> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > index de0a76d..d7950b5 100644
> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > @@ -86,12 +86,6 @@ static inline bool sun4i_backend_format_is_packed_yuv422(uint32_t format)
> >  	}
> >  }
> >  
> > -static inline bool sun4i_backend_format_is_yuv(uint32_t format)
> > -{
> > -	return sun4i_backend_format_is_planar_yuv(format) ||
> > -		sun4i_backend_format_is_packed_yuv422(format);
> > -}
> 
> sun4i_backend_format_is_planar_yuv() is now unused so could be nuked.
> Also the one remaining use of sun4i_backend_format_is_packed_yuv422()
> could be replaced with 'is_yuv && num_planes == 1', so that one could
> be easily killed off ass well.

I will have this in a separate patch.
> > -
> >  static void sun4i_backend_apply_color_correction(struct sunxi_engine *engine)
> >  {
> >  	int i;
> > @@ -304,7 +298,7 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend,
> >  			   SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA_EN,
> >  			   val);
> >  
> > -	if (sun4i_backend_format_is_yuv(fb->format->format))
> > +	if (fb->format->is_yuv)
> >  		return sun4i_backend_update_yuv_format(backend, layer, plane);
> >  
> >  	ret = sun4i_backend_drm_format_to_layer(fb->format->format, &val);
> > @@ -384,7 +378,7 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
> >  	 */
> >  	paddr -= PHYS_OFFSET;
> >  
> > -	if (sun4i_backend_format_is_yuv(fb->format->format))
> > +	if (fb->format->is_yuv)
> >  		return sun4i_backend_update_yuv_buffer(backend, fb, paddr);
> >  
> >  	/* Write the 32 lower bits of the address (in bits) */
> > @@ -502,7 +496,7 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
> >  		if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE))
> >  			num_alpha_planes++;
> >  
> > -		if (sun4i_backend_format_is_yuv(fb->format->format)) {
> > +		if (fb->format->is_yuv) {
> >  			DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
> >  			num_yuv_planes++;
> >  		}
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrj?l?
> Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: ayan.halder@arm.com (Ayan Halder)
To: linux-arm-kernel@lists.infradead.org
Subject: [Intel-gfx] [PATCH 5/5] drm/sun4i: Substitute sun4i_backend_format_is_yuv() with format->is_yuv
Date: Wed, 18 Jul 2018 15:40:51 +0100	[thread overview]
Message-ID: <20180718144050.GA2056@arm.com> (raw)
In-Reply-To: <20180718101540.GT5565@intel.com>

On Wed, Jul 18, 2018 at 01:15:40PM +0300, Ville Syrj?l? wrote:

Hi Ville,
> On Tue, Jul 17, 2018 at 06:13:46PM +0100, Ayan Kumar Halder wrote:
> > drm_format_info table has a field 'is_yuv' to denote if the format
> > is yuv or not. The driver is expected to use this instead of
> > having a function for the same purpose.
> > 
> > Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com>
> > ---
> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > index de0a76d..d7950b5 100644
> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > @@ -86,12 +86,6 @@ static inline bool sun4i_backend_format_is_packed_yuv422(uint32_t format)
> >  	}
> >  }
> >  
> > -static inline bool sun4i_backend_format_is_yuv(uint32_t format)
> > -{
> > -	return sun4i_backend_format_is_planar_yuv(format) ||
> > -		sun4i_backend_format_is_packed_yuv422(format);
> > -}
> 
> sun4i_backend_format_is_planar_yuv() is now unused so could be nuked.
> Also the one remaining use of sun4i_backend_format_is_packed_yuv422()
> could be replaced with 'is_yuv && num_planes == 1', so that one could
> be easily killed off ass well.

I will have this in a separate patch.
> > -
> >  static void sun4i_backend_apply_color_correction(struct sunxi_engine *engine)
> >  {
> >  	int i;
> > @@ -304,7 +298,7 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend,
> >  			   SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA_EN,
> >  			   val);
> >  
> > -	if (sun4i_backend_format_is_yuv(fb->format->format))
> > +	if (fb->format->is_yuv)
> >  		return sun4i_backend_update_yuv_format(backend, layer, plane);
> >  
> >  	ret = sun4i_backend_drm_format_to_layer(fb->format->format, &val);
> > @@ -384,7 +378,7 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
> >  	 */
> >  	paddr -= PHYS_OFFSET;
> >  
> > -	if (sun4i_backend_format_is_yuv(fb->format->format))
> > +	if (fb->format->is_yuv)
> >  		return sun4i_backend_update_yuv_buffer(backend, fb, paddr);
> >  
> >  	/* Write the 32 lower bits of the address (in bits) */
> > @@ -502,7 +496,7 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
> >  		if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE))
> >  			num_alpha_planes++;
> >  
> > -		if (sun4i_backend_format_is_yuv(fb->format->format)) {
> > +		if (fb->format->is_yuv) {
> >  			DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
> >  			num_yuv_planes++;
> >  		}
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrj?l?
> Intel

  reply	other threads:[~2018-07-18 14:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 17:13 [PATCH 1/5] drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv Ayan Kumar Halder
2018-07-17 17:13 ` Ayan Kumar Halder
2018-07-17 17:13 ` Ayan Kumar Halder
2018-07-17 17:13 ` [PATCH 2/5] drm/i915: Substitute intel_format_is_yuv() with format->is_yuv Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-17 17:13 ` [PATCH 3/5] drm/rockchip: Substitute is_yuv_support() " Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-17 17:13 ` [PATCH 4/5] drm/omapdrm: Substitute format_is_yuv() " Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-18 10:17   ` [Intel-gfx] " Ville Syrjälä
2018-07-18 10:17     ` Ville Syrjälä
2018-07-18 10:17     ` Ville Syrjälä
2018-09-26  9:30     ` [Intel-gfx] " Tomi Valkeinen
2018-09-26  9:30       ` Tomi Valkeinen
2018-09-26  9:30       ` Tomi Valkeinen
2018-07-17 17:13 ` [PATCH 5/5] drm/sun4i: Substitute sun4i_backend_format_is_yuv() " Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-17 17:13   ` Ayan Kumar Halder
2018-07-18 10:15   ` [Intel-gfx] " Ville Syrjälä
2018-07-18 10:15     ` Ville Syrjälä
2018-07-18 14:40     ` Ayan Halder [this message]
2018-07-18 14:40       ` Ayan Halder
2018-07-18 14:40       ` Ayan Halder
2018-07-17 17:58 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv Patchwork
2018-07-17 18:19 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-17 23:45 ` ✓ Fi.CI.IGT: " Patchwork
2018-07-18  9:12 ` [PATCH 1/5] " Brian Starkey
2018-07-18  9:12   ` Brian Starkey
2018-07-18  9:12   ` Brian Starkey
2018-07-18 10:21   ` Ville Syrjälä
2018-07-18 10:21     ` Ville Syrjälä
2018-07-18 10:21     ` Ville Syrjälä

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=20180718144050.GA2056@arm.com \
    --to=ayan.halder@arm.com \
    --cc=afd@ti.com \
    --cc=airlied@linux.ie \
    --cc=bparrot@ti.com \
    --cc=brian.starkey@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=malidp@foss.arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=nd@arm.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=seanpaul@chromium.org \
    --cc=sre@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wens@csie.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 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.