[libdrm] amdgpu: update amdgpu_drm.h

Submitted by Marek Olšák on Jan. 15, 2019, 7:25 p.m.

Details

Message ID 20190115192527.11581-1-maraeo@gmail.com
State New
Headers show
Series "amdgpu: update amdgpu_drm.h" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Marek Olšák Jan. 15, 2019, 7:25 p.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 include/drm/amdgpu_drm.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch hide | download patch | download mbox

diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
index 1ceec56d..be84e43c 100644
--- a/include/drm/amdgpu_drm.h
+++ b/include/drm/amdgpu_drm.h
@@ -319,20 +319,26 @@  struct drm_amdgpu_gem_userptr {
 #define AMDGPU_TILING_BANK_HEIGHT_SHIFT			17
 #define AMDGPU_TILING_BANK_HEIGHT_MASK			0x3
 #define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT		19
 #define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK		0x3
 #define AMDGPU_TILING_NUM_BANKS_SHIFT			21
 #define AMDGPU_TILING_NUM_BANKS_MASK			0x3
 
 /* GFX9 and later: */
 #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT		0
 #define AMDGPU_TILING_SWIZZLE_MODE_MASK			0x1f
+#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT		5
+#define AMDGPU_TILING_DCC_OFFSET_256B_MASK		0xFFFFFF
+#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT		29
+#define AMDGPU_TILING_DCC_PITCH_MAX_MASK		0x3FFF
+#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT		43
+#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK		0x1
 
 /* Set/Get helpers for tiling flags. */
 #define AMDGPU_TILING_SET(field, value) \
 	(((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT)
 #define AMDGPU_TILING_GET(value, field) \
 	(((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK)
 
 #define AMDGPU_GEM_METADATA_OP_SET_METADATA                  1
 #define AMDGPU_GEM_METADATA_OP_GET_METADATA                  2
 
@@ -658,20 +664,22 @@  struct drm_amdgpu_cs_chunk_data {
 	/* 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
 	/* Subquery id: Query GFX RLC SRLC firmware version */
 	#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f
 	/* Subquery id: Query GFX RLC SRLG firmware version */
 	#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10
 	/* Subquery id: Query GFX RLC SRLS firmware version */
 	#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11
+	/* Subquery id: Query DMCU firmware version */
+	#define AMDGPU_INFO_FW_DMCU		0x12
 /* number of bytes moved for TTM migration */
 #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
 /* the used VRAM size */
 #define AMDGPU_INFO_VRAM_USAGE			0x10
 /* the used GTT size */
 #define AMDGPU_INFO_GTT_USAGE			0x11
 /* Information about GDS, etc. resource configuration */
 #define AMDGPU_INFO_GDS_CONFIG			0x13
 /* Query information about VRAM and GTT domains */
 #define AMDGPU_INFO_VRAM_GTT			0x14

Comments

Am 15.01.19 um 20:25 schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak@amd.com>

Maybe note in the commit message from which upstream kernel.

With that in place the patch is Reviewed-by: Christian König 
<christian.koenig@amd.com>

>
> ---
>   include/drm/amdgpu_drm.h | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
> index 1ceec56d..be84e43c 100644
> --- a/include/drm/amdgpu_drm.h
> +++ b/include/drm/amdgpu_drm.h
> @@ -319,20 +319,26 @@ struct drm_amdgpu_gem_userptr {
>   #define AMDGPU_TILING_BANK_HEIGHT_SHIFT			17
>   #define AMDGPU_TILING_BANK_HEIGHT_MASK			0x3
>   #define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT		19
>   #define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK		0x3
>   #define AMDGPU_TILING_NUM_BANKS_SHIFT			21
>   #define AMDGPU_TILING_NUM_BANKS_MASK			0x3
>   
>   /* GFX9 and later: */
>   #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT		0
>   #define AMDGPU_TILING_SWIZZLE_MODE_MASK			0x1f
> +#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT		5
> +#define AMDGPU_TILING_DCC_OFFSET_256B_MASK		0xFFFFFF
> +#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT		29
> +#define AMDGPU_TILING_DCC_PITCH_MAX_MASK		0x3FFF
> +#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT		43
> +#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK		0x1
>   
>   /* Set/Get helpers for tiling flags. */
>   #define AMDGPU_TILING_SET(field, value) \
>   	(((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT)
>   #define AMDGPU_TILING_GET(value, field) \
>   	(((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK)
>   
>   #define AMDGPU_GEM_METADATA_OP_SET_METADATA                  1
>   #define AMDGPU_GEM_METADATA_OP_GET_METADATA                  2
>   
> @@ -658,20 +664,22 @@ struct drm_amdgpu_cs_chunk_data {
>   	/* 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
>   	/* Subquery id: Query GFX RLC SRLC firmware version */
>   	#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f
>   	/* Subquery id: Query GFX RLC SRLG firmware version */
>   	#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10
>   	/* Subquery id: Query GFX RLC SRLS firmware version */
>   	#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11
> +	/* Subquery id: Query DMCU firmware version */
> +	#define AMDGPU_INFO_FW_DMCU		0x12
>   /* number of bytes moved for TTM migration */
>   #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
>   /* the used VRAM size */
>   #define AMDGPU_INFO_VRAM_USAGE			0x10
>   /* the used GTT size */
>   #define AMDGPU_INFO_GTT_USAGE			0x11
>   /* Information about GDS, etc. resource configuration */
>   #define AMDGPU_INFO_GDS_CONFIG			0x13
>   /* Query information about VRAM and GTT domains */
>   #define AMDGPU_INFO_VRAM_GTT			0x14
On Wed, Jan 16, 2019 at 2:37 AM Christian König <
ckoenig.leichtzumerken@gmail.com> wrote:

> Am 15.01.19 um 20:25 schrieb Marek Olšák:
> > From: Marek Olšák <marek.olsak@amd.com>
>
> Maybe note in the commit message from which upstream kernel.
>

No upstream kernel. It's from amd-staging-drm-next.

Marek
Am 16.01.19 um 17:15 schrieb Marek Olšák:
On Wed, Jan 16, 2019 at 2:37 AM Christian König <ckoenig.leichtzumerken@gmail.com<mailto:ckoenig.leichtzumerken@gmail.com>> wrote:
Am 15.01.19 um 20:25 schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak@amd.com<mailto:marek.olsak@amd.com>>


Maybe note in the commit message from which upstream kernel.

No upstream kernel. It's from amd-staging-drm-next.

That's a problem, see the rules for updating this.

IIRC the code must land in an upstream kernel before it can be committed to libdrm.

Christian.


Marek
On 1/16/19 11:24 AM, Koenig, Christian wrote:
> Am 16.01.19 um 17:15 schrieb Marek Olšák:

>> On Wed, Jan 16, 2019 at 2:37 AM Christian König 

>> <ckoenig.leichtzumerken@gmail.com 

>> <mailto:ckoenig.leichtzumerken@gmail.com>> wrote:

>>

>>     Am 15.01.19 um 20:25 schrieb Marek Olšák:

>>     > From: Marek Olšák <marek.olsak@amd.com <mailto:marek.olsak@amd.com>>

>>

>>     Maybe note in the commit message from which upstream kernel.

>>

>>

>> No upstream kernel. It's from amd-staging-drm-next.

> 

> That's a problem, see the rules for updating this.

> 

> IIRC the code must land in an upstream kernel before it can be committed 

> to libdrm.

> 

> Christian.

> 

>>

>> Marek


The DCC flags should be in 5.0.

Nicholas Kazlauskas

>>

> 

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

>
On Wed, Jan 16, 2019 at 11:25 AM Koenig, Christian <Christian.Koenig@amd.com>
wrote:

> Am 16.01.19 um 17:15 schrieb Marek Olšák:
>
> On Wed, Jan 16, 2019 at 2:37 AM Christian König <
> ckoenig.leichtzumerken@gmail.com> wrote:
>
>> Am 15.01.19 um 20:25 schrieb Marek Olšák:
>> > From: Marek Olšák <marek.olsak@amd.com>
>>
>> Maybe note in the commit message from which upstream kernel.
>>
>
> No upstream kernel. It's from amd-staging-drm-next.
>
>
> That's a problem, see the rules for updating this.
>
> IIRC the code must land in an upstream kernel before it can be committed
> to libdrm.
>
> Christian.
>

It looks like it's all in the master branch.

Marek
On 2019-01-16 5:56 p.m., Marek Olšák wrote:
> On Wed, Jan 16, 2019 at 11:25 AM Koenig, Christian <Christian.Koenig@amd.com>
> wrote:
>> Am 16.01.19 um 17:15 schrieb Marek Olšák:
>> On Wed, Jan 16, 2019 at 2:37 AM Christian König <
>> ckoenig.leichtzumerken@gmail.com> wrote:
>>
>>> Am 15.01.19 um 20:25 schrieb Marek Olšák:
>>>> From: Marek Olšák <marek.olsak@amd.com>
>>>
>>> Maybe note in the commit message from which upstream kernel.
>>>
>>
>> No upstream kernel. It's from amd-staging-drm-next.
>>
>>
>> That's a problem, see the rules for updating this.
>>
>> IIRC the code must land in an upstream kernel before it can be committed
>> to libdrm.
>>
>> Christian.
>>
> 
> It looks like it's all in the master branch.

That's good, but please follow the procedure documented in
include/drm/README next time.