[Intel-gfx] [PATCH] drm/i915: Prefer encoder->name over port_name()

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 30 20:27:33 UTC 2019


Quoting Ville Syrjala (2019-08-30 19:27:19)
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> enum port is a mess now because it no longer matches the spec
> at all. Let's start to dig ourselves out of this hole by
> reducing our reliance on port_name(). This should at least make
> a bunch of debug messages a bit more sensible while we think how
> to fill the the hole properly.
> 
> Based on the following cocci script with a lot of manual cleanup
> (all the format strings etc.):
> @@
> expression E;
> @@
> (
> - port_name(E->port)
> + E->base.base.id, E->base.name
> |
> - port_name(E.port)
> + E.base.base.id, E.base.name
> )
> 
> @@
> enum port P;
> expression E;
> @@
>   P = E->port
> <...
> - port_name(P)
> + E->base.base.id, E->base.name
> ...>
> 
> @@
> enum port P;
> expression E;
> @@
>   P = E.port
> <...
> - port_name(P)
> + E.base.base.id, E.base.name
> ...>
> 
> @@
> expression E;
> @@
> {
> - enum port P = E;
> ... when != P
> }
> 

The conversions looks correct and ENCODER:%d will help tally the various
debug messages, so

> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list