Re: [Intel-gfx] [PATCH 04/14] drm: Use driver specified encoder name

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

 



On Wed, Dec 09, 2015 at 08:32:45AM +0100, Daniel Vetter wrote:
> On Tue, Dec 08, 2015 at 06:41:52PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > 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@xxxxxxxxxxxxxxx>
> 
> Any reason you didn't roll this out for all the encoder debug output we
> have in core files, like with the others?

Since the name was already present I figured we'd already be using it.
grep 'ENCODER:%' seems to agree for the most part. I see one exception
in intel_display.c.

> -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@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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