Re: [PATCH v4 05/11] drm/atomic: Use drm_framebuffer_print_info()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Noralf,

Thank you for the patch.

On Monday, 30 October 2017 18:29:39 EET Noralf Trønnes wrote:
> Use drm_framebuffer_print_info() to print framebuffer info in
> drm_atomic_plane_print_state(). This will give optional GEM info as well.
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx>

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

> ---
>  drivers/gpu/drm/drm_atomic.c | 18 +++---------------
>  1 file changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 6c9c4a8e09af..6d626355ba4e 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -33,6 +33,7 @@
>  #include <linux/sync_file.h>
> 
>  #include "drm_crtc_internal.h"
> +#include "drm_internal.h"
> 
>  void __drm_crtc_commit_free(struct kref *kref)
>  {
> @@ -934,21 +935,8 @@ static void drm_atomic_plane_print_state(struct
> drm_printer *p, drm_printf(p, "plane[%u]: %s\n", plane->base.id,
> plane->name);
>  	drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)");
>  	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 = fb->format->num_planes;
> -		struct drm_format_name_buf format_name;
> -
> -		drm_printf(p, "\t\tformat=%s\n",
> -		              drm_get_format_name(fb->format->format, &format_name));
> -		drm_printf(p, "\t\t\tmodifier=0x%llx\n", fb->modifier);
> -		drm_printf(p, "\t\tsize=%dx%d\n", fb->width, fb->height);
> -		drm_printf(p, "\t\tlayers:\n");
> -		for (i = 0; i < n; i++) {
> -			drm_printf(p, "\t\t\tpitch[%d]=%u\n", i, fb->pitches[i]);
> -			drm_printf(p, "\t\t\toffset[%d]=%u\n", i, fb->offsets[i]);
> -		}
> -	}
> +	if (state->fb)
> +		drm_framebuffer_print_info(p, 2, state->fb);
>  	drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG(&dest));
>  	drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG(&src));
>  	drm_printf(p, "\trotation=%x\n", state->rotation);


-- 
Regards,

Laurent Pinchart

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux