[Intel-gfx] [PATCH 1/2] drm/i915: Add pretty printer for device info flags

Chris Wilson chris at chris-wilson.co.uk
Mon Dec 18 21:07:29 UTC 2017


Quoting Jani Nikula (2017-12-18 17:37:13)
> On Mon, 18 Dec 2017, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > Looks good, I'm thinking we might push the drm_printer to the caller of
> > intel_device_info_dump(), but this is already a substantial improvement
> 
> Param ordering seems a bit surprising in both patches. Target first?

The param order at the moment tries to be (object-doing-the-dump,
stream-as-parameter). I don't think it is quite so backwards as it first
appears, when compared to printf(stderr, fmt,...) or even seq_printf(m,
fmt, ..). In both of those printf cases, it is the stream that can be
argued is providing the object (even more so if you create your own
stream using cookie_io_functions_t). But for us, it is clearer to argue
that the object we control is the object providing the method to output
into the stream.
-Chris


More information about the Intel-gfx mailing list