aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-graphics/drm/libdrm-2.4.66/0127-amdgpu-sync-amdgpu_drm.h-with-the-kernel.patch
blob: eb62bd4211a53221fd59de342f4e6bd288012368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 3002e9518ee9b3660f4bd676c546785364885f3c Mon Sep 17 00:00:00 2001
From: Arindam Nath <arindam.nath@amd.com>
Date: Mon, 9 Jan 2017 14:56:25 +0530
Subject: [PATCH 10/10] amdgpu: sync amdgpu_drm.h with the kernel
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

v1:
* User might want to query the maximum number of UVD
  instances supported by firmware. In addition to that,
  if there are multiple applications using UVD handles
  at the same time, he might also want to query the
  currently used number of handles.

  For this we add a new query AMDGPU_INFO_NUM_HANDLES
  and a new struct drm_amdgpu_info_num_handles to
  get these values.

v2:
* Generated using make headers_install.
* Generated from linux-stable/master commit
  a121103c922847ba5010819a3f250f1f7fc84ab8

Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by:Raveendra Talabattula <raveendra.talabattula@amd.com>
---
 include/drm/amdgpu_drm.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
index d40742e..8272f93 100644
--- a/include/drm/amdgpu_drm.h
+++ b/include/drm/amdgpu_drm.h
@@ -571,6 +571,8 @@ struct drm_amdgpu_cs_chunk_data {
 #define AMDGPU_INFO_VIRTUAL_RANGE		0x18
 /* Query memory about VRAM and GTT domains */
 #define AMDGPU_INFO_MEMORY			0x19
+/* Query UVD handles */
+#define AMDGPU_INFO_NUM_HANDLES                 0x1C
 
 /* gpu capability */
 #define AMDGPU_INFO_CAPABILITY			0x50
@@ -764,6 +766,13 @@ struct drm_amdgpu_info_hw_ip {
 	uint32_t  _pad;
 };
 
+struct drm_amdgpu_info_num_handles {
+	/** Max handles as supported by firmware for UVD */
+	uint32_t uvd_max_handles;
+	/** Handles currently in use for UVD */
+	uint32_t uvd_used_handles;
+};
+
 /*
  * Supported GPU families
  */
-- 
2.7.4