OSDN Git Service

drm/i915: Add support for half float framebuffers for gen4+ primary planes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 15 Oct 2019 19:30:30 +0000 (22:30 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 24 Oct 2019 18:22:25 +0000 (21:22 +0300)
commit03b0ce9532ec5d2dba52e17970fae5a484bb5531
tree39b4c56b291040a2df1f0ebf4fd02e23ead7a9e8
parent6e6c155da65be0ea4a682f41021a9f635e16ecfe
drm/i915: Add support for half float framebuffers for gen4+ primary planes

gen4+ supports fp16 pixel formats on the primary planes. Add the
relevant code.

On ivb fp16 scanout is slightly busted. The output from the plane will
have 1/4 the expected value. For the primary plane we would have to
use the pipe gamma or pipe csc to correct that which would affect all
the other planes as well, hence we simply choose not to expose fp16
on the ivb primary plane. On hsw the primary plane got fixed.

On gmch platforms I observed that the plane width must be below 2k
pixels with fp16 or else we get a corrupted image. This limitation
does not seem to be documented in bspec. I verified the exact limit
using the chv pipe B primary plane since it has windowing capability.
The stride limits are unaffected by fp16.

v2: Rebase on top of icl fp16
    Split thea gen4+ primary plane bits into a separate patch
    Deal with HAS_GMCH()

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-9-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c