Re: [PATCH] drm/modes: Print the mode status in human readable form

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

 



On Mon, Feb 02, 2015 at 12:56:26PM -0500, Alex Deucher wrote:
> On Mon, Feb 2, 2015 at 12:13 PM,  <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> >
> > Currently when a mode is rejected the reason is printed as a raw number.
> > Having to manually decode that to a enum drm_mode_status value is
> > tiresome. Have the code do the decoding instead and print the result
> > in a human readable format.
> >
> > Just having an array of strings indexed with the mode status doesn't
> > work since the enum includes negative values. So we offset the status
> > by +3 which makes all the indexes non-negative. Also add a bit of
> > paranoia into the code to catch out of bounds accesses in case
> > someone adds more enum values but forgets to update the code.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

Merged to my drm-misc branch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
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