OSDN Git Service

drm/i915/fbc: Nuke lots of crap from intel_fbc_state_cache
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 24 Nov 2021 11:36:35 +0000 (13:36 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 3 Dec 2021 10:49:33 +0000 (12:49 +0200)
commit2e6c99f88679121eacc75196bdf6da8b0e513066
treefdce422e9cdc2382e727daf54bb182ad4dfa9b8c
parentb6e201f5f13bd61ab8e5187daa0e149826cda154
drm/i915/fbc: Nuke lots of crap from intel_fbc_state_cache

There's no need to store all this stuff in intel_fbc_state_cache.
Just check it all against the plane/crtc states and store only
what we need. Probably more should get nuked still, but this
is a start.

So what we'll do is:
- each plane will check its own state and update its local
  no_fbc_reason
- the per-plane no_fbc_reason (if any) then gets propagated
  to the cache->no_fbc_reason while doing the actual update
- fbc->no_fbc_reason gets updated in the end with either
  the value from the cache or directly from frontbuffer
  tracking

It's still a bit messy, but should hopefuly get cleaned up
more in the future. At least now we can observe each plane's
reasons for rejecting FBC now more consistently, and we don't
have so mcuh redundant state store all over the place.

v2: store no_fbc_reason per-plane instead of per-pipe

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211124113652.22090-4-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_fbc.c
drivers/gpu/drm/i915/display/intel_fbc.h
drivers/gpu/drm/i915/i915_drv.h