All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/omap: remove unnecessary pitch round-up
Date: Tue, 19 Apr 2016 05:11:25 +0300	[thread overview]
Message-ID: <13942539.ldz4zLjmYV@avalon> (raw)
In-Reply-To: <1460994134-12587-2-git-send-email-tomi.valkeinen@ti.com>

Hi Tomi,

Thank you for the patch.

On Monday 18 Apr 2016 18:42:12 Tomi Valkeinen wrote:
> omapdrm checks if the pixel stride is divisible by 8. This is meant to
> ensure that the byte stride is 32, which is required by SGX.
> 
> The check is not correct, as it checks for pixels, not bytes, and thus
> needlessly increases the stride for, e.g., NV12.
> 
> Also, SGX driver is not supported in the mainline, and the TI's SGX
> driver nowadays does the memory allocation itself and doesn't rely on
> omapdrm to figure out the correct pitch.
> 
> So we can just remove the whole roundup.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/omap_drv.h | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h
> b/drivers/gpu/drm/omapdrm/omap_drv.h index 0fbe17d0ec6f..bdce6ec64a07
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.h
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
> @@ -244,10 +244,7 @@ static inline int align_pitch(int pitch, int width, int
> bpp) int bytespp = (bpp + 7) / 8;
>  	/* in case someone tries to feed us a completely bogus stride: */
>  	pitch = max(pitch, width * bytespp);
> -	/* PVR needs alignment to 8 pixels.. right now that is the most
> -	 * restrictive stride requirement..
> -	 */
> -	return roundup(pitch, 8 * bytespp);
> +	return pitch;
>  }
> 
>  /* map crtc to vblank mask */

-- 
Regards,

Laurent Pinchart

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

  reply	other threads:[~2016-04-19  2:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 15:42 [PATCH 1/4] drm/omap: Fix missing includes Tomi Valkeinen
2016-04-18 15:42 ` [PATCH 2/4] drm/omap: remove unnecessary pitch round-up Tomi Valkeinen
2016-04-19  2:11   ` Laurent Pinchart [this message]
2016-04-18 15:42 ` [PATCH 3/4] drm/omap: remove align_pitch() Tomi Valkeinen
2016-04-19  2:12   ` Laurent Pinchart
2016-04-19  6:15     ` Tomi Valkeinen
2016-04-19  8:34       ` Laurent Pinchart
2016-04-18 15:42 ` [PATCH 4/4] drm/omap: fix OMAP4 hdmi_core_powerdown_disable() Tomi Valkeinen
2016-04-19  2:17 ` [PATCH 1/4] drm/omap: Fix missing includes Laurent Pinchart
2016-04-19  5:36   ` Tomi Valkeinen
2016-04-19  8:32     ` Laurent Pinchart
2016-04-19  8:48       ` Tomi Valkeinen

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=13942539.ldz4zLjmYV@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tomi.valkeinen@ti.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 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.