On Wed, Nov 04, 2015 at 11:19:58PM +0200, ville.syrj...@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
> 
> 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.syrj...@linux.intel.com>

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 <ch...@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to