[Intel-gfx] [PATCH 04/14] drm: Use driver specified encoder name
Daniel Vetter
daniel at ffwll.ch
Tue Dec 8 23:32:45 PST 2015
On Tue, Dec 08, 2015 at 06:41:52PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Use the encoder name passed by the driver if non-NULL, otherwise fall
> back to the old style name.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Any reason you didn't roll this out for all the encoder debug output we
have in core files, like with the others?
-Daniel
> ---
> drivers/gpu/drm/drm_crtc.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 3efff5dfe4f6..4bdfa5d31a6c 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1101,9 +1101,17 @@ int drm_encoder_init(struct drm_device *dev,
> encoder->dev = dev;
> encoder->encoder_type = encoder_type;
> encoder->funcs = funcs;
> - encoder->name = kasprintf(GFP_KERNEL, "%s-%d",
> - drm_encoder_enum_list[encoder_type].name,
> - encoder->base.id);
> + if (name) {
> + va_list ap;
> +
> + va_start(ap, name);
> + encoder->name = kvasprintf(GFP_KERNEL, name, ap);
> + va_end(ap);
> + } else {
> + encoder->name = kasprintf(GFP_KERNEL, "%s-%d",
> + drm_encoder_enum_list[encoder_type].name,
> + encoder->base.id);
> + }
> if (!encoder->name) {
> ret = -ENOMEM;
> goto out_put;
> --
> 2.4.10
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list