[Intel-gfx] [RFC 0/4] Wire gen9 cursor interface to universal plane registers
Matt Roper
matthew.d.roper at intel.com
Wed Oct 26 22:51:27 UTC 2016
Gen9 has a traditional cursor plane that is mutually exclusive with the
system's top-most "universal" plane; it seems likely that two planes are really
a single shared hardware unit with two different register interfaces. Thus far
i915 has exposed a cursor plane to userspace that's hooked up to the old-style
cursor registers; we just pretended that the top-most universal plane didn't
exist and reported one fewer "sprite/overlay" planes for each pipe than the
platform technically has. Let's switch this around so that the cursor exposed
to userspace is actually wired up to the previously-unused top-most universal
plane registers. With this change we'll still present the same cursor ABI to
userspace that we always have, but internally we'll just be programming a
different set of registers and doing so in a way that's more consistent with
how all the other gen9 planes work --- less cursor-specific special cases
throughout the code.
Aside from making the code a bit simpler (fewer cursor-specific special
cases), this will also pave the way to eventually exposing the top-most
plane in a more full-featured manner to userspace clients that don't
need a traditional cursor and wish to opt into having access to an
additional sprite/overlay-style plane instead.
It's worth noting that a lot of the special-cased cursor-specific code
was in the gen9 watermark programming. It's good to simplify that code,
but we should keep an eye out for any unwanted side effects of this
patch; since sprites/overlays tend to get used less than cursors, it's
possible that this could help us uncover additional underruns that
nobody had run across yet. Or it could have the opposite effect and
eliminate some of the underruns that we haven't been able to get rid of
yet.
This is just an RFC at this point; we should probably land all of the in-flight
watermark work before this so that those series don't need additional rebasing.
There's also still one known problem I need to track down --- it seems the
color correction of the plane is slightly different when programming the
universal registers vs the legacy cursor registers, so IGT tests like
kms_cursor_crc report CRC mismatches, even though the results look correct
visually.
Note that patches #1 and 2 are trivial renaming patches and could probably be
merged immediately if nobody has concerns with them.
Matt Roper (4):
drm/i915: Rename for_each_plane -> for_each_universal_plane
drm/i915: Use macro in place of open-coded for_each_universal_plane
loop
drm/i915/gen9: Expose top-most universal plane as cursor
drm/i915/gen9: Skip debugfs cursor output for universal plane
platforms
drivers/gpu/drm/i915/i915_debugfs.c | 32 ++++++-----
drivers/gpu/drm/i915/i915_drv.h | 13 ++++-
drivers/gpu/drm/i915/intel_device_info.c | 38 ++++++++----
drivers/gpu/drm/i915/intel_display.c | 99 ++++++++++++--------------------
drivers/gpu/drm/i915/intel_drv.h | 16 +++---
drivers/gpu/drm/i915/intel_pm.c | 89 ++++------------------------
drivers/gpu/drm/i915/intel_sprite.c | 6 +-
7 files changed, 116 insertions(+), 177 deletions(-)
--
2.1.4
More information about the Intel-gfx
mailing list