[PATCH v2] drm/tegra: dc: Implement legacy blending
Dmitry Osipenko
digetx at gmail.com
Thu Dec 21 19:13:05 UTC 2017
On 21.12.2017 21:46, Dmitry Osipenko wrote:
> On 21.12.2017 17:03, Thierry Reding wrote:
>> From: Thierry Reding <treding at nvidia.com>
>>
>> This implements alpha blending on legacy display controllers (Tegra20,
>> Tegra30 and Tegra114). While it's theoretically possible to support the
>> zpos property to enable userspace to specify the Z-order of each plane
>> individually, this is not currently supported and the same fixed Z-
>> order as previously defined is used.
>>
>> Reverts commit 71835caa00e8 ("drm/tegra: fb: Force alpha formats") since
>> the opaque formats are now supported.
>>
>> Reported-by: Dmitry Osipenko <digetx at gmail.com>
>> Fixes: 7772fdaef939 ("drm/tegra: Support ARGB and ABGR formats")
>> Signed-off-by: Thierry Reding <treding at nvidia.com>
>> ---
[snip]
>> +
>> +void tegra_plane_check_dependent(struct tegra_plane *tegra,
>> + struct tegra_plane_state *state)
>> +{
>> + struct drm_plane_state *old, *new;
>> + struct drm_plane *plane;
>> + unsigned int zpos[2];
>> + unsigned int i;
>> +
>> + for (i = 0; i < 3; i++)
>> + state->dependent[i] = false;
>> +
>> + for (i = 0; i < 2; i++)
>> + zpos[i] = 0;
>> +
>> + for_each_oldnew_plane_in_state(state->base.state, plane, old, new, i) {
>
> Somehow this works when 2 windows are blended (primary plane + cursor). But
> unfortunately this doesn't work at all in a case when 3 windows blended (primary
> + video overlay + cursor), for some reason there is only one plane in the state
> here, so blending dependency tracking doesn't work at all. I'll continue to look
> into it, but for now I don't know why it doesn't work as expected. If you have
> any idea, please tell.
Actually, I think this code only works when all planes are updated in a single
commit. We need to handle cases when only some of the active planes are
adjusting the state.
[snip]
More information about the dri-devel
mailing list