OSDN Git Service

drm/displayid: provide access to DisplayID version and primary use case
authorJani Nikula <jani.nikula@intel.com>
Thu, 16 Feb 2023 20:45:00 +0000 (22:45 +0200)
committerDmitry Osipenko <dmitry.osipenko@collabora.com>
Sun, 26 Feb 2023 23:58:38 +0000 (02:58 +0300)
commitb568e6bb49d49ef05fa3aa4bb294ae960e1d778a
treeb1187fe00269f4ab0dee377412a01da1976f3874
parent5631f6a0436ac30eecfb2e6fdcd0a517f90add8a
drm/displayid: provide access to DisplayID version and primary use case

The DisplayID structure version and primary use case are stored in the
DisplayID Base Section. We should be checking them in a number of places
when parsing the DisplayID blocks. Currently, we completely ignore the
primary use case, and just look at the block tags without cross-checking
against structure version.

Store the version and primary use case in the DisplayID iterator, and
provide accessors to them. In general, the information is needed when
iterating the blocks, and this is a convenient place to both store and
retrieve the information during parsing.

Promote using accessors rather than users poking at the iterator
directly.

Cc: Iaroslav Boliukin <iam@lach.pw>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ad8a35c109f97ffe115e6b18e4a132b592f11089.1676580180.git.jani.nikula@intel.com
drivers/gpu/drm/drm_displayid.c
include/drm/drm_displayid.h