[PATCH 6/6] [v4] drm/i915: Add support for CCS modifiers

Daniel Stone daniel at fooishbar.org
Tue Aug 8 16:24:13 UTC 2017


Hi,

On 3 August 2017 at 12:00, Daniel Stone <daniel at fooishbar.org> wrote:
> On 1 August 2017 at 17:58, Ben Widawsky <ben at bwidawsk.net> wrote:
>> @@ -1240,6 +1253,19 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
>>                 plane_formats = skl_plane_formats;
>>                 num_plane_formats = ARRAY_SIZE(skl_plane_formats);
>>                 modifiers = skl_plane_format_modifiers;
>> +       } else if (INTEL_GEN(dev_priv) >= 9) {
>> +               intel_plane->can_scale = true;
>> +               state->scaler_id = -1;
>> +
>> +               intel_plane->update_plane = skl_update_plane;
>> +               intel_plane->disable_plane = skl_disable_plane;
>> +
>> +               plane_formats = skl_plane_formats;
>> +               num_plane_formats = ARRAY_SIZE(skl_plane_formats);
>> +               if (pipe >= PIPE_C)
>
>
> if (pipe >= PIPE_C || plane >= PLANE_SPRITE1)
>
> cf. skl_check_ccs_aux_surface() which rejects CCS on anything other
> than PRIMARY/SPRITE0.

Turns out that should be 1 rather than PLANE_SPRITE1.

Anyway, I've pulled out CCS modifiers for all sprite planes in this
series. Whilst actually testing it, I discovered DDB allocations were
hopelessly broken.

Starting with a 1920x1080 primary plane which had (at some point) had
a CCS surface on it, and moving to a 1920x1080 _linear_ primary plane
with a 256x256 CCS sprite plane, I ended up with a DDB split of 443
primary / 32 plane. Y-tiling needs 33 blocks for even 256x256, so it
didn't work.

Given that, I've removed advertisement of Y, Yf, Y_CCS and Y_CCS, in
order to not give userspace false hope. Once DDB allocation is fixed,
we can start advertising these modifiers.

Cheers,
Daniel


More information about the dri-devel mailing list