• Ville Syrjälä's avatar
    drm/i915: Pass intel_encoder to infoframe functions · 790ea70c
    Ville Syrjälä authored
    Make life simpler by passing around intel_encoder instead of
    drm_encoder.
    
    @r1@
    identifier F =~ "infoframe";
    identifier I, M;
    @@
    F(
    - struct drm_encoder *I
    + struct intel_encoder *I
      , ...)
    {
    <...
    (
    - I->M
    + I->base.M
    |
    - I
    + &I->base
    )
    ...>
    }
    
    @r2@
    identifier F =~ "infoframe";
    identifier I;
    type T, ST;
    @@
    ST {
    ...
    	T (*F)(
    -	       struct drm_encoder *I
    +	       struct intel_encoder *encoder
    	       , ...);
    ...
    };
    
    @@
    identifier r1.F;
    expression E;
    @@
    F(
    - E
    + to_intel_encoder(E)
      ,...)
    
    @@
    identifier r2.F;
    expression E, X;
    @@
    (
    X.F(
    -   E
    +   to_intel_encoder(E)
        ,...)
    |
    X->F(
    -    E
    +    to_intel_encoder(E)
         ,...)
    )
    
    @@
    expression E;
    @@
    (
    - to_intel_encoder(&E->base)
    + E
    |
    - to_intel_encoder(&E->base.base)
    + &E->base
    )
    
    @@
    identifier D, M;
    expression E;
    @@
     D = enc_to_dig_port(&E->base)
    <...
    (
    - D->base.M
    + E->M
    |
    - &D->base
    + E
    )
    ...>
    
    @@
    identifier D;
    expression E;
    type T;
    @@
    - T D = enc_to_dig_port(E);
    ... when != D
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-10-ville.syrjala@linux.intel.comAcked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    790ea70c
intel_psr.c 33 KB