OSDN Git Service

media: cedrus: Add helper for checking capabilities
authorJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 2 Nov 2022 18:08:03 +0000 (19:08 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 4 Nov 2022 15:56:33 +0000 (16:56 +0100)
commite7efb377ea50adf4a3583dd048453cca5f803775
tree9cf53ecde3bb72ed6ca1f79f21b08cd3da74cb2d
parentbc603309688b77c848c00b9fa19a4fe0b9c677b6
media: cedrus: Add helper for checking capabilities

There is several different Cedrus cores with varying capabilities, so
some operations like listing formats depends on checks if feature is
supported or not.

Currently check for capabilities is only in format handling functions,
but it will be used also elsewhere later. Let's convert this check to
helper and while at it, also simplify it. There is no need to check if
capability mask is zero, condition will still work properly.

No functional changes intended.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/sunxi/cedrus/cedrus.h
drivers/staging/media/sunxi/cedrus/cedrus_video.c