[PATCH v2] drm/vc4: Advertise supported modifiers for planes

Daniel Stone daniel at fooishbar.org
Wed Aug 9 16:50:50 UTC 2017


On 8 August 2017 at 21:36, Eric Anholt <eric at anholt.net> wrote:
> Daniel Stone <daniels at collabora.com> writes:
>> +     case DRM_FORMAT_YUV422:
>> +     case DRM_FORMAT_YVU422:
>> +     case DRM_FORMAT_YUV420:
>> +     case DRM_FORMAT_YVU420:
>> +     case DRM_FORMAT_NV12:
>> +     case DRM_FORMAT_NV16:
>> +             return (modifier == DRM_FORMAT_MOD_LINEAR);
>> +     }
>> +}
>
> drivers/gpu/drm/vc4/vc4_plane.c: In function ‘vc4_format_mod_supported’:
> drivers/gpu/drm/vc4/vc4_plane.c:889:1: warning: control reaches end of non-void function [-Wreturn-type]
>  }
>
> Can we just replace the ARGB cases with a default case?  Or maybe just
> drm_format_info(format)->num_planes > 1?

I'd sent the wrong version whilst juggling trees; see the follow-up
sent very shortly after. Really don't mind which; was trying to search
for something which seemed most foolproof. num_planes > 1 is probably
the best proxy, so I'll do that. The patch to check modifier
correctness also needs a rebase after the bo-unref changes, so I'll
resend bothj.

Cheers,
Daniel


More information about the dri-devel mailing list