OSDN Git Service

drm/panfrost: Remove features meant for userspace
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sun, 9 Jan 2022 17:09:18 +0000 (12:09 -0500)
committerSteven Price <steven.price@arm.com>
Thu, 13 Jan 2022 09:48:26 +0000 (09:48 +0000)
commit16a89697a3a0f793ad707f0bd32969419392bbe4
treed33a71fc1cb7ba6674199b1cfcddbbcc806df0f0
parent44ab30b056149bd59dd7989a593dd25ead6007fd
drm/panfrost: Remove features meant for userspace

Early versions of the legacy kernel driver included comprehensive
feature lists for every GPU, even though most of the enumerated features
only matter to userspace. For example, HW_FEATURE_INTERPIPE_REG_ALIASING
was a feature bit indicating that a GPU had "interpipe register
aliasing": arithmetic, load/store, and texture instruction all use
common general-purpose registers. GPUs without this feature bit have
dedicated load/store and texture "registers". Whether a GPU has this
feature or not is irrelevant to the kernel; it only matters in the
userspace compiler's register allocator. It's silly to enumerate it in
kernel space, and the information is understandably unused. To
underscore the point, this feature only makes sense in the context of
the Midgard instruction set. Bifrost never had dedicated load/store or
texture registers, so the feature bit was vacuously set for all Bifrost
hardware, even though this conveys no useful information.

To clean up the feature list, delete feature bits which could not
possibly matter to the kernel, leaving only those which do affect the
register-level operation of the chip.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220109170920.2921-2-alyssa.rosenzweig@collabora.com
drivers/gpu/drm/panfrost/panfrost_features.h