Re: [Intel-gfx] [PATCH 2/2] drm/mm: Convert to drm_printer

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

 



On Wed, Dec 28, 2016 at 05:42:10PM +0100, Daniel Vetter wrote:
>  static int ttm_pl_vram = TTM_PL_VRAM;
> diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
> index 2ce92f4dcfc7..598fde492863 100644
> --- a/drivers/gpu/drm/selftests/test-drm_mm.c
> +++ b/drivers/gpu/drm/selftests/test-drm_mm.c
> @@ -249,8 +249,10 @@ static int igt_init(void *ignored)
>  	}
>  
>  out:
> -	if (ret)
> -		drm_mm_debug_table(&mm, __func__);
> +	if (ret) {
> +		struct drm_printer p = drm_debug_printer(__func__);
> +		drm_mm_print_table(&p, &mm);
> +	}

drm_mm_print_table(&drm_debug_printer(__func__), &mm);

But that says the parameters are reversed. Either this should be

	drm_print_mm(&printer, &mm);

or
	drm_mm_print(&mm, &printer);

Then here we would want a 

#define show_mm(mm) drm_mm_print((mm), &drm_debug_printer(__func__))

for similarity with show_scan(), show_holes(), with the exception of
igt_debug where we still ultimately want to redirect the output to a
stringbuf.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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