[22/32] drm/atomic: Replace drm_format_num_planes() with fb->format->num_planes
diff mbox

Message ID 1479399271-31991-23-git-send-email-ville.syrjala@linux.intel.com
State New
Headers show

Commit Message

Ville Syrjälä Nov. 17, 2016, 4:14 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Avoid the format info lookup and just use the pointer stored under
drm_framebuffer.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Nov. 17, 2016, 5:58 p.m. UTC | #1
Hi Ville,

Thank you for the patch.

On Thursday 17 Nov 2016 18:14:21 ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Avoid the format info lookup and just use the pointer stored under
> drm_framebuffer.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_atomic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 85466cc67819..cb6ab0106b0b 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -960,7 +960,7 @@ static void drm_atomic_plane_print_state(struct
> drm_printer *p, drm_printf(p, "\tfb=%u\n", state->fb ? state->fb->base.id :
> 0);
>  	if (state->fb) {
>  		struct drm_framebuffer *fb = state->fb;
> -		int i, n = drm_format_num_planes(fb->pixel_format);
> +		int i, n = fb->format->num_planes;

Assuming you adress my concerns in patch 19/32,

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

>  		struct drm_format_name_buf format_name;
> 
>  		drm_printf(p, "\t\tformat=%s\n",

Patch
diff mbox

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 85466cc67819..cb6ab0106b0b 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -960,7 +960,7 @@  static void drm_atomic_plane_print_state(struct drm_printer *p,
 	drm_printf(p, "\tfb=%u\n", state->fb ? state->fb->base.id : 0);
 	if (state->fb) {
 		struct drm_framebuffer *fb = state->fb;
-		int i, n = drm_format_num_planes(fb->pixel_format);
+		int i, n = fb->format->num_planes;
 		struct drm_format_name_buf format_name;
 
 		drm_printf(p, "\t\tformat=%s\n",