On Wed, Nov 04, 2015 at 11:19:58PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > Replace the is_sdvob bool and some sdvo_reg checks with enum port. This > makes the SDVO code look more modern, and gets rid of explicit register > offset checks in the code which will hamper register type checking. > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Ok, I had to actually read the code to verify some of the changes! > @@ -2950,7 +2945,7 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) > return false; > > intel_sdvo->sdvo_reg = sdvo_reg; > - intel_sdvo->is_sdvob = is_sdvob; > + intel_sdvo->port = port; I wonder if it is worth putting a little verification in here like assert_sdvo_port_valid() { if (HAS_PCH(dev) WARN_ON(port != PORT_B); else WARN_ON(port != PORT_B || port != PORT_C); } But anyway, Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx