include: Update DRM uAPI headers
PATCH 2/3 NOMERGE: include: Add getfb2 ioctl
In reply to Daniel StoneNot yet actually merged to an actual kernel tree.
--- include/drm-uapi/drm.h | 1 + 1 file changed, 1 insertion(+)
include/drm-uapi/drm.h +1 -0
@@ -886,6 +886,7 @@ extern "C" {#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees)#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) +#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCA, struct drm_mode_fb_cmd2)/** * Device specific ioctls should only be in their respective headers
Signature · 6 lines
2.17.0.rc1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 3/3 tests/kms_getfb: Add getfb2 tests
In reply to Daniel StoneMirroring addfb2, add tests for the new ioctl which will return us information about framebuffers containing multiple buffers, as well as modifiers.
--- tests/kms_getfb.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+)
tests/kms_getfb.c +92 -0
@@ -191,7 +191,96 @@ static void test_duplicate_handles(int fd)do_ioctl (fd,DRM_IOCTL_MODE_RMFB , &add.fb_id);gem_close (fd, add.handles[0 ]); } +} + +static void test_getfb2 (int fd) +{ +struct drm_mode_fb_cmd2 add_basic = {}; +struct drm_mode_fb_cmd2 get = {}; + + igt_fixture { +int ret; + + add_basic.width =1024 ; + add_basic.height =1024 ; + add_basic.pixel_format =DRM_FORMAT_XRGB8888 ; + add_basic.pitches[0 ] =1024 *4 ; + add_basic.handles[0 ] =igt_create_bo_with_dimensions (fd,1024 ,1024 , +DRM_FORMAT_XRGB8888 ,0 ,0 ,NULL ,NULL ,NULL ); +do_ioctl (fd,DRM_IOCTL_MODE_ADDFB2 , &add_basic); + get.fb_id = add_basic.fb_id; + ret =drmIoctl (fd,DRM_IOCTL_MODE_GETFB2 , &get); +igt_require (ret ==0 ); +igt_assert_neq_u32 (get.handles[0 ],0 ); +gem_close (fd, get.handles[0 ]); + } + + igt_subtest("getfb2-handle-zero") { +struct drm_mode_fb_cmd2 get = {}; +do_ioctl_err (fd,DRM_IOCTL_MODE_GETFB2 , &get,ENOENT ); + } + + igt_subtest("getfb2-handle-closed") { +struct drm_mode_fb_cmd2 add = add_basic; +struct drm_mode_fb_cmd2 get = { }; + + add.handles[0 ] =igt_create_bo_with_dimensions (fd,1024 ,1024 , +DRM_FORMAT_XRGB8888 ,0 ,0 ,NULL ,NULL ,NULL ); +igt_assert (add.handles[0 ]); +do_ioctl (fd,DRM_IOCTL_MODE_ADDFB2 , &add); +do_ioctl (fd,DRM_IOCTL_MODE_RMFB , &add.fb_id); + + get.fb_id = add.fb_id; +do_ioctl_err (fd,DRM_IOCTL_MODE_GETFB2 , &get,ENOENT ); +gem_close (fd, add.handles[0 ]); + } + + igt_subtest("getfb2-handle-not-fb") { +struct drm_mode_fb_cmd get = { .fb_id =get_any_prop_id (fd) }; +igt_require (get.fb_id >0 ); +do_ioctl_err (fd,DRM_IOCTL_MODE_GETFB , &get,ENOENT ); + } + + igt_subtest("getfb2-accept-ccs") { +struct drm_mode_fb_cmd2 add_ccs = { }; +struct drm_mode_fb_cmd2 get = { }; +int i; +get_ccs_fb (fd, &add_ccs); +igt_require (add_ccs.fb_id !=0 ); + get.fb_id = add_ccs.fb_id; +do_ioctl (fd,DRM_IOCTL_MODE_GETFB2 , &get); + +igt_assert_eq_u32 (get.width, add_ccs.width); +igt_assert_eq_u32 (get.height, add_ccs.height); +igt_assert (get.flags &DRM_MODE_FB_MODIFIERS ); + +for (i =0 ; i <ARRAY_SIZE (get.handles); i++) { +igt_assert_eq_u32 (get.pitches[i], add_ccs.pitches[i]); +igt_assert_eq_u32 (get.offsets[i], add_ccs.offsets[i]); +if (add_ccs.handles[i] !=0 ) { +igt_assert_neq_u32 (get.handles[i],0 ); +igt_assert_neq_u32 (get.handles[i], + add_ccs.handles[i]); +igt_assert_eq_u64 (get.modifier[i], + add_ccs.modifier[i]); + }else { +igt_assert_eq_u32 (get.handles[i],0 ); +igt_assert_eq_u64 (get.modifier[i], +DRM_FORMAT_MOD_INVALID ); + } + } +igt_assert_eq_u32 (get.handles[0 ], get.handles[1 ]); + +do_ioctl (fd,DRM_IOCTL_MODE_RMFB , &get.fb_id); +gem_close (fd, add_ccs.handles[0 ]); +gem_close (fd, get.handles[0 ]); + } + + igt_fixture { +drmIoctl (fd,DRM_IOCTL_MODE_RMFB , &add_basic.fb_id); +gem_close (fd, add_basic.handles[0 ]); + } } igt_main
@@ -207,6 +296,9 @@ igt_mainigt_subtest_group test_duplicate_handles (fd ); +igt_subtest_group +test_getfb2 (fd ); +igt_fixture close (fd ); }
Signature · 6 lines
2.17.0.rc1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 1/3 include: Update DRM uAPI headers
Taken from the drm-next pull for 4.17-rc1 (694f54f680f7).
--- include/drm-uapi/amdgpu_drm.h | 3 +++ include/drm-uapi/drm_mode.h | 9 ++++++--- include/drm-uapi/etnaviv_drm.h | 6 ++++++ include/drm-uapi/msm_drm.h | 2 ++ include/drm-uapi/virtgpu_drm.h | 1 + 5 files changed, 18 insertions(+), 3 deletions(-)
include/drm-uapi/amdgpu_drm.h +3 -0
@@ -618,6 +618,8 @@ struct drm_amdgpu_cs_chunk_data {#define AMDGPU_INFO_FW_SOS 0x0c/* Subquery id: Query PSP ASD firmware version */ #define AMDGPU_INFO_FW_ASD 0x0d +/* Subquery id: Query VCN firmware version */ +#define AMDGPU_INFO_FW_VCN 0x0e/* number of bytes moved for TTM migration */ #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f/* the used VRAM size */
@@ -806,6 +808,7 @@ struct drm_amdgpu_info_firmware {#define AMDGPU_VRAM_TYPE_GDDR5 5#define AMDGPU_VRAM_TYPE_HBM 6#define AMDGPU_VRAM_TYPE_DDR3 7 +#define AMDGPU_VRAM_TYPE_DDR4 8struct drm_amdgpu_info_device {/** PCI Device ID */
include/drm-uapi/drm_mode.h +6 -3
@@ -363,7 +363,7 @@ struct drm_mode_get_connector {__u32 pad; }; -#define DRM_MODE_PROP_PENDING (1<<0) +#define DRM_MODE_PROP_PENDING (1<<0)/* deprecated, do not use */ #define DRM_MODE_PROP_RANGE (1<<1)#define DRM_MODE_PROP_IMMUTABLE (1<<2)#define DRM_MODE_PROP_ENUM (1<<3)/* enumerated type with text strings */
@@ -598,8 +598,11 @@ struct drm_mode_crtc_lut { };struct drm_color_ctm { -/* Conversion matrix in S31.32 format. */ -__s64 matrix[9 ]; +/* +* Conversion matrix in S31.32 sign-magnitude +* (not two's complement!) format. +*/ +__u64 matrix[9 ]; };struct drm_color_lut {
include/drm-uapi/etnaviv_drm.h +6 -0
@@ -55,6 +55,12 @@ struct drm_etnaviv_timespec {#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09 +#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a +#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b +#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c +#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d +#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e +#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11
include/drm-uapi/msm_drm.h +2 -0
@@ -201,10 +201,12 @@ struct drm_msm_gem_submit_bo {#define MSM_SUBMIT_NO_IMPLICIT 0x80000000/* disable implicit sync */ #define MSM_SUBMIT_FENCE_FD_IN 0x40000000/* enable input fence_fd */ #define MSM_SUBMIT_FENCE_FD_OUT 0x20000000/* enable output fence_fd */ +#define MSM_SUBMIT_SUDO 0x10000000/* run submitted cmds from RB */ #define MSM_SUBMIT_FLAGS ( \ MSM_SUBMIT_NO_IMPLICIT | \ MSM_SUBMIT_FENCE_FD_IN | \ MSM_SUBMIT_FENCE_FD_OUT | \ + MSM_SUBMIT_SUDO | \ 0)/* Each cmdstream submit consists of a table of buffers involved, and
include/drm-uapi/virtgpu_drm.h +1 -0
@@ -63,6 +63,7 @@ struct drm_virtgpu_execbuffer { };#define VIRTGPU_PARAM_3D_FEATURES 1/* do we have 3D features in the hw */ +#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2/* do we have the capset fix */ struct drm_virtgpu_getparam {__u64 param;
Signature · 6 lines
2.17.0.rc1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] include: Update DRM uAPI headers
== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/3] include: Update DRM uAPI headers
URL : https://patchwork.freedesktop.org/series/40959/
State : failure
== Summary ==
Applying: include: Update DRM uAPI headers
Applying: NOMERGE: include: Add getfb2 ioctl
Applying: tests/kms_getfb: Add getfb2 tests
Patch failed at 0003 tests/kms_getfb: Add getfb2 tests
The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev