[igt-dev] [PATCH i-g-t 1/4] tools/intel_reg: Simplify negative ports

Jani Nikula jani.nikula at linux.intel.com
Mon Mar 9 07:52:03 UTC 2020


On Fri, 06 Mar 2020, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Let's avoid having to type in the explicit negative value for
> all the port enums.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  tools/intel_reg_spec.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/intel_reg_spec.h b/tools/intel_reg_spec.h
> index c94c61bab3f8..a6e0514387df 100644
> --- a/tools/intel_reg_spec.h
> +++ b/tools/intel_reg_spec.h
> @@ -25,10 +25,11 @@
>  #define __INTEL_REG_SPEC_H__
>  

Might copy-paste this comment

/* Negative port numbers are not real sideband ports. */

from intel_reg.c somewhere here.

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

>  enum port_addr {
> +	PORT_MMIO = -127,
> +	PORT_PORTIO_VGA,	/* see vga reg read/write */
> +	PORT_MMIO_VGA,		/* see vga reg read/write */
> +
>  	PORT_NONE = 0,
> -	PORT_MMIO = -1,
> -	PORT_PORTIO_VGA = -2,	/* see vga reg read/write */
> -	PORT_MMIO_VGA = -3,	/* see vga reg read/write */
>  
>  	/* vlv */
>  	PORT_BUNIT = 0x03,

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the igt-dev mailing list