Skip to content

Commit 03fad56

Browse files
committed
drm/file: use explicit values for enum drm_minor_type
This makes it clearer that the values cannot be changed because they are ABI. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by:James Zhu <James.Zhu@amd.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Christian König <christian.koenig@amd.com> Cc: Marek Olšák <marek.olsak@amd.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20230714104557.518457-2-contact@emersion.fr
1 parent e48aedf commit 03fad56

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

include/drm/drm_file.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ struct file;
5050
* header include loops we need it here for now.
5151
*/
5252

53-
/* Note that the order of this enum is ABI (it determines
53+
/* Note that the values of this enum are ABI (it determines
5454
* /dev/dri/renderD* numbers).
5555
*
5656
* Setting DRM_MINOR_ACCEL to 32 gives enough space for more drm minors to
5757
* be implemented before we hit any future
5858
*/
5959
enum drm_minor_type {
60-
DRM_MINOR_PRIMARY,
61-
DRM_MINOR_CONTROL,
62-
DRM_MINOR_RENDER,
60+
DRM_MINOR_PRIMARY = 0,
61+
DRM_MINOR_CONTROL = 1,
62+
DRM_MINOR_RENDER = 2,
6363
DRM_MINOR_ACCEL = 32,
6464
};
6565

0 commit comments

Comments
 (0)