All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Move LRC register offsets to a header file
@ 2018-01-22 20:06 Michel Thierry
  2018-01-22 20:14 ` Chris Wilson
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Michel Thierry @ 2018-01-22 20:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi

Newer platforms may have subtle offset changes, which will increase the
number of defines, so it is probably better to start moving them to its
own header file. Also move the macros used while setting the reg state.

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c             | 50 +-----------------
 drivers/gpu/drm/i915/intel_lrc_reg_offsets.h | 78 ++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 49 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg_offsets.h

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 506bc2bc04f9..bc9287645bf3 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -137,6 +137,7 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 #include "i915_gem_render_state.h"
+#include "intel_lrc_reg_offsets.h"
 #include "intel_mocs.h"
 
 #define RING_EXECLIST_QFULL		(1 << 0x2)
@@ -156,55 +157,6 @@
 #define GEN8_CTX_STATUS_COMPLETED_MASK \
 	 (GEN8_CTX_STATUS_COMPLETE | GEN8_CTX_STATUS_PREEMPTED)
 
-#define CTX_LRI_HEADER_0		0x01
-#define CTX_CONTEXT_CONTROL		0x02
-#define CTX_RING_HEAD			0x04
-#define CTX_RING_TAIL			0x06
-#define CTX_RING_BUFFER_START		0x08
-#define CTX_RING_BUFFER_CONTROL		0x0a
-#define CTX_BB_HEAD_U			0x0c
-#define CTX_BB_HEAD_L			0x0e
-#define CTX_BB_STATE			0x10
-#define CTX_SECOND_BB_HEAD_U		0x12
-#define CTX_SECOND_BB_HEAD_L		0x14
-#define CTX_SECOND_BB_STATE		0x16
-#define CTX_BB_PER_CTX_PTR		0x18
-#define CTX_RCS_INDIRECT_CTX		0x1a
-#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
-#define CTX_LRI_HEADER_1		0x21
-#define CTX_CTX_TIMESTAMP		0x22
-#define CTX_PDP3_UDW			0x24
-#define CTX_PDP3_LDW			0x26
-#define CTX_PDP2_UDW			0x28
-#define CTX_PDP2_LDW			0x2a
-#define CTX_PDP1_UDW			0x2c
-#define CTX_PDP1_LDW			0x2e
-#define CTX_PDP0_UDW			0x30
-#define CTX_PDP0_LDW			0x32
-#define CTX_LRI_HEADER_2		0x41
-#define CTX_R_PWR_CLK_STATE		0x42
-#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
-
-#define CTX_REG(reg_state, pos, reg, val) do { \
-	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
-	(reg_state)[(pos)+1] = (val); \
-} while (0)
-
-#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
-	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
-	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
-	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
-} while (0)
-
-#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
-	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
-	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
-} while (0)
-
-#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
-#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
-#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
-
 /* Typical size of the average request (2 pipecontrols and a MI_BB) */
 #define EXECLISTS_REQUEST_SIZE 64 /* bytes */
 #define WA_TAIL_DWORDS 2
diff --git a/drivers/gpu/drm/i915/intel_lrc_reg_offsets.h b/drivers/gpu/drm/i915/intel_lrc_reg_offsets.h
new file mode 100644
index 000000000000..4918dbf02244
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_lrc_reg_offsets.h
@@ -0,0 +1,78 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _INTEL_LRC_REG_OFFSETS_H_
+#define _INTEL_LRC_REG_OFFSETS_H_
+
+/* GEN8+ Reg State Context */
+#define CTX_LRI_HEADER_0		0x01
+#define CTX_CONTEXT_CONTROL		0x02
+#define CTX_RING_HEAD			0x04
+#define CTX_RING_TAIL			0x06
+#define CTX_RING_BUFFER_START		0x08
+#define CTX_RING_BUFFER_CONTROL		0x0a
+#define CTX_BB_HEAD_U			0x0c
+#define CTX_BB_HEAD_L			0x0e
+#define CTX_BB_STATE			0x10
+#define CTX_SECOND_BB_HEAD_U		0x12
+#define CTX_SECOND_BB_HEAD_L		0x14
+#define CTX_SECOND_BB_STATE		0x16
+#define CTX_BB_PER_CTX_PTR		0x18
+#define CTX_RCS_INDIRECT_CTX		0x1a
+#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
+#define CTX_LRI_HEADER_1		0x21
+#define CTX_CTX_TIMESTAMP		0x22
+#define CTX_PDP3_UDW			0x24
+#define CTX_PDP3_LDW			0x26
+#define CTX_PDP2_UDW			0x28
+#define CTX_PDP2_LDW			0x2a
+#define CTX_PDP1_UDW			0x2c
+#define CTX_PDP1_LDW			0x2e
+#define CTX_PDP0_UDW			0x30
+#define CTX_PDP0_LDW			0x32
+#define CTX_LRI_HEADER_2		0x41
+#define CTX_R_PWR_CLK_STATE		0x42
+#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
+
+#define CTX_REG(reg_state, pos, reg, val) do { \
+	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
+	(reg_state)[(pos)+1] = (val); \
+} while (0)
+
+#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
+	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
+	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
+	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
+} while (0)
+
+#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
+	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
+	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
+} while (0)
+
+#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
+#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
+#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
+
+#endif /* _INTEL_LRC_REG_OFFSETS_H_ */
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
@ 2018-01-22 20:14 ` Chris Wilson
  2018-01-22 20:26   ` Michel Thierry
  2018-01-22 20:26 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 24+ messages in thread
From: Chris Wilson @ 2018-01-22 20:14 UTC (permalink / raw)
  To: Michel Thierry, intel-gfx; +Cc: Lucas De Marchi

Quoting Michel Thierry (2018-01-22 20:06:32)
> Newer platforms may have subtle offset changes, which will increase the
> number of defines, so it is probably better to start moving them to its
> own header file. Also move the macros used while setting the reg state.

I was scared that we might be starting to duplicate the lrc setup
code. If you can see a quick way of splitting the lrc setup from
execlists submission, that would also be good.
 
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c             | 50 +-----------------
>  drivers/gpu/drm/i915/intel_lrc_reg_offsets.h | 78 ++++++++++++++++++++++++++++
>  2 files changed, 79 insertions(+), 49 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg_offsets.h
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 506bc2bc04f9..bc9287645bf3 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -137,6 +137,7 @@
>  #include <drm/i915_drm.h>
>  #include "i915_drv.h"
>  #include "i915_gem_render_state.h"
> +#include "intel_lrc_reg_offsets.h"

Just intel_lrc_reg.h to be consistent with i915_reg.h and
intel_guc_reg.h

The numbers look the same, so with a new filename,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:14 ` Chris Wilson
@ 2018-01-22 20:26   ` Michel Thierry
  0 siblings, 0 replies; 24+ messages in thread
From: Michel Thierry @ 2018-01-22 20:26 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Lucas De Marchi

On 1/22/2018 12:14 PM, Chris Wilson wrote:
> Quoting Michel Thierry (2018-01-22 20:06:32)
>> Newer platforms may have subtle offset changes, which will increase the
>> number of defines, so it is probably better to start moving them to its
>> own header file. Also move the macros used while setting the reg state.
> 
> I was scared that we might be starting to duplicate the lrc setup
> code. If you can see a quick way of splitting the lrc setup from
> execlists submission, that would also be good.
>   

At the very least, we will need different implementations of 
execlists_init_reg_state.


>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_lrc.c             | 50 +-----------------
>>   drivers/gpu/drm/i915/intel_lrc_reg_offsets.h | 78 ++++++++++++++++++++++++++++
>>   2 files changed, 79 insertions(+), 49 deletions(-)
>>   create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg_offsets.h
>>
>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
>> index 506bc2bc04f9..bc9287645bf3 100644
>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> @@ -137,6 +137,7 @@
>>   #include <drm/i915_drm.h>
>>   #include "i915_drv.h"
>>   #include "i915_gem_render_state.h"
>> +#include "intel_lrc_reg_offsets.h"
> 
> Just intel_lrc_reg.h to be consistent with i915_reg.h and
> intel_guc_reg.h
> 
> The numbers look the same, so with a new filename,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks, I'll resend it with the new filename.

> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
  2018-01-22 20:14 ` Chris Wilson
@ 2018-01-22 20:26 ` Patchwork
  2018-01-22 20:32 ` [PATCH v2] " Michel Thierry
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2018-01-22 20:26 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move LRC register offsets to a header file
URL   : https://patchwork.freedesktop.org/series/36930/
State : success

== Summary ==

Series 36930v1 drm/i915: Move LRC register offsets to a header file
https://patchwork.freedesktop.org/api/1.0/series/36930/revisions/1/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> DMESG-WARN (fi-skl-6700k2) fdo#104108
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:421s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:488s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:282s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:483s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:469s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:455s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:281s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:519s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:393s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:400s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:418s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:460s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:411s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:460s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:499s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:458s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:504s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:579s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:427s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:508s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:526s
fi-skl-6700k2    total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:498s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:476s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:416s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:431s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:527s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:395s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:477s

06c8efda323ac918fad0e26d81e8884574ec8b84 drm-tip: 2018y-01m-22d-17h-43m-26s UTC integration manifest
8b448bc12149 drm/i915: Move LRC register offsets to a header file

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7745/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
  2018-01-22 20:14 ` Chris Wilson
  2018-01-22 20:26 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-01-22 20:32 ` Michel Thierry
  2018-01-22 20:56   ` Lucas De Marchi
  2018-01-22 20:54 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev2) Patchwork
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 24+ messages in thread
From: Michel Thierry @ 2018-01-22 20:32 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi

Newer platforms may have subtle offset changes, which will increase the
number of defines, so it is probably better to start moving them to its
own header file. Also move the macros used while setting the reg state.

v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
intel_guc_reg.h (Chris)

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c     | 50 +----------------------
 drivers/gpu/drm/i915/intel_lrc_reg.h | 78 ++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 49 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg.h

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 506bc2bc04f9..3cf30b982524 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -137,6 +137,7 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 #include "i915_gem_render_state.h"
+#include "intel_lrc_reg.h"
 #include "intel_mocs.h"
 
 #define RING_EXECLIST_QFULL		(1 << 0x2)
@@ -156,55 +157,6 @@
 #define GEN8_CTX_STATUS_COMPLETED_MASK \
 	 (GEN8_CTX_STATUS_COMPLETE | GEN8_CTX_STATUS_PREEMPTED)
 
-#define CTX_LRI_HEADER_0		0x01
-#define CTX_CONTEXT_CONTROL		0x02
-#define CTX_RING_HEAD			0x04
-#define CTX_RING_TAIL			0x06
-#define CTX_RING_BUFFER_START		0x08
-#define CTX_RING_BUFFER_CONTROL		0x0a
-#define CTX_BB_HEAD_U			0x0c
-#define CTX_BB_HEAD_L			0x0e
-#define CTX_BB_STATE			0x10
-#define CTX_SECOND_BB_HEAD_U		0x12
-#define CTX_SECOND_BB_HEAD_L		0x14
-#define CTX_SECOND_BB_STATE		0x16
-#define CTX_BB_PER_CTX_PTR		0x18
-#define CTX_RCS_INDIRECT_CTX		0x1a
-#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
-#define CTX_LRI_HEADER_1		0x21
-#define CTX_CTX_TIMESTAMP		0x22
-#define CTX_PDP3_UDW			0x24
-#define CTX_PDP3_LDW			0x26
-#define CTX_PDP2_UDW			0x28
-#define CTX_PDP2_LDW			0x2a
-#define CTX_PDP1_UDW			0x2c
-#define CTX_PDP1_LDW			0x2e
-#define CTX_PDP0_UDW			0x30
-#define CTX_PDP0_LDW			0x32
-#define CTX_LRI_HEADER_2		0x41
-#define CTX_R_PWR_CLK_STATE		0x42
-#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
-
-#define CTX_REG(reg_state, pos, reg, val) do { \
-	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
-	(reg_state)[(pos)+1] = (val); \
-} while (0)
-
-#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
-	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
-	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
-	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
-} while (0)
-
-#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
-	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
-	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
-} while (0)
-
-#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
-#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
-#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
-
 /* Typical size of the average request (2 pipecontrols and a MI_BB) */
 #define EXECLISTS_REQUEST_SIZE 64 /* bytes */
 #define WA_TAIL_DWORDS 2
diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h b/drivers/gpu/drm/i915/intel_lrc_reg.h
new file mode 100644
index 000000000000..f50d63cb4b66
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
@@ -0,0 +1,78 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _INTEL_LRC_REG_H_
+#define _INTEL_LRC_REG_H_
+
+/* GEN8+ Reg State Context */
+#define CTX_LRI_HEADER_0		0x01
+#define CTX_CONTEXT_CONTROL		0x02
+#define CTX_RING_HEAD			0x04
+#define CTX_RING_TAIL			0x06
+#define CTX_RING_BUFFER_START		0x08
+#define CTX_RING_BUFFER_CONTROL		0x0a
+#define CTX_BB_HEAD_U			0x0c
+#define CTX_BB_HEAD_L			0x0e
+#define CTX_BB_STATE			0x10
+#define CTX_SECOND_BB_HEAD_U		0x12
+#define CTX_SECOND_BB_HEAD_L		0x14
+#define CTX_SECOND_BB_STATE		0x16
+#define CTX_BB_PER_CTX_PTR		0x18
+#define CTX_RCS_INDIRECT_CTX		0x1a
+#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
+#define CTX_LRI_HEADER_1		0x21
+#define CTX_CTX_TIMESTAMP		0x22
+#define CTX_PDP3_UDW			0x24
+#define CTX_PDP3_LDW			0x26
+#define CTX_PDP2_UDW			0x28
+#define CTX_PDP2_LDW			0x2a
+#define CTX_PDP1_UDW			0x2c
+#define CTX_PDP1_LDW			0x2e
+#define CTX_PDP0_UDW			0x30
+#define CTX_PDP0_LDW			0x32
+#define CTX_LRI_HEADER_2		0x41
+#define CTX_R_PWR_CLK_STATE		0x42
+#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
+
+#define CTX_REG(reg_state, pos, reg, val) do { \
+	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
+	(reg_state)[(pos)+1] = (val); \
+} while (0)
+
+#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
+	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
+	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
+	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
+} while (0)
+
+#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
+	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
+	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
+} while (0)
+
+#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
+#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
+#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
+
+#endif /* _INTEL_LRC_REG_H_ */
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev2)
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (2 preceding siblings ...)
  2018-01-22 20:32 ` [PATCH v2] " Michel Thierry
@ 2018-01-22 20:54 ` Patchwork
  2018-01-23  0:41 ` [PATCH v3] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2018-01-22 20:54 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move LRC register offsets to a header file (rev2)
URL   : https://patchwork.freedesktop.org/series/36930/
State : success

== Summary ==

Series 36930v2 drm/i915: Move LRC register offsets to a header file
https://patchwork.freedesktop.org/api/1.0/series/36930/revisions/2/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:418s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:372s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:483s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:282s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:483s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:490s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:465s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:456s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:279s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:513s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:391s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:399s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:418s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:455s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:415s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:454s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:499s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:457s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:503s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:579s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:430s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:507s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:528s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:490s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:484s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:418s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:517s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:395s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:575s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:471s
fi-bdw-gvtdvm failed to collect. IGT log at Patchwork_7746/fi-bdw-gvtdvm/igt.log

06c8efda323ac918fad0e26d81e8884574ec8b84 drm-tip: 2018y-01m-22d-17h-43m-26s UTC integration manifest
1ff1111fb939 drm/i915: Move LRC register offsets to a header file

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7746/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:32 ` [PATCH v2] " Michel Thierry
@ 2018-01-22 20:56   ` Lucas De Marchi
  2018-01-22 21:28     ` Michal Wajdeczko
  0 siblings, 1 reply; 24+ messages in thread
From: Lucas De Marchi @ 2018-01-22 20:56 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

On Mon, Jan 22, 2018 at 12:32:57PM -0800, Michel Thierry wrote:
> Newer platforms may have subtle offset changes, which will increase the
> number of defines, so it is probably better to start moving them to its
> own header file. Also move the macros used while setting the reg state.
> 
> v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
> intel_guc_reg.h (Chris)
> 
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---

[ ... ]

> diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h b/drivers/gpu/drm/i915/intel_lrc_reg.h
> new file mode 100644
> index 000000000000..f50d63cb4b66
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
> @@ -0,0 +1,78 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + */

Looking at other files added after the SPDX change, it doesn't look
like we should duplicate the information about license. So in this case
AFAIU it should contain only the SPDX tag and the Copyright, but not
license text. See

git log --grep "Remove redundant license text"


Lucas De Marchi


> +
> +#ifndef _INTEL_LRC_REG_H_
> +#define _INTEL_LRC_REG_H_
> +
> +/* GEN8+ Reg State Context */
> +#define CTX_LRI_HEADER_0		0x01
> +#define CTX_CONTEXT_CONTROL		0x02
> +#define CTX_RING_HEAD			0x04
> +#define CTX_RING_TAIL			0x06
> +#define CTX_RING_BUFFER_START		0x08
> +#define CTX_RING_BUFFER_CONTROL		0x0a
> +#define CTX_BB_HEAD_U			0x0c
> +#define CTX_BB_HEAD_L			0x0e
> +#define CTX_BB_STATE			0x10
> +#define CTX_SECOND_BB_HEAD_U		0x12
> +#define CTX_SECOND_BB_HEAD_L		0x14
> +#define CTX_SECOND_BB_STATE		0x16
> +#define CTX_BB_PER_CTX_PTR		0x18
> +#define CTX_RCS_INDIRECT_CTX		0x1a
> +#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
> +#define CTX_LRI_HEADER_1		0x21
> +#define CTX_CTX_TIMESTAMP		0x22
> +#define CTX_PDP3_UDW			0x24
> +#define CTX_PDP3_LDW			0x26
> +#define CTX_PDP2_UDW			0x28
> +#define CTX_PDP2_LDW			0x2a
> +#define CTX_PDP1_UDW			0x2c
> +#define CTX_PDP1_LDW			0x2e
> +#define CTX_PDP0_UDW			0x30
> +#define CTX_PDP0_LDW			0x32
> +#define CTX_LRI_HEADER_2		0x41
> +#define CTX_R_PWR_CLK_STATE		0x42
> +#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
> +
> +#define CTX_REG(reg_state, pos, reg, val) do { \
> +	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
> +	(reg_state)[(pos)+1] = (val); \
> +} while (0)
> +
> +#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
> +	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
> +	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
> +	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
> +} while (0)
> +
> +#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
> +	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
> +	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
> +} while (0)
> +
> +#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
> +#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
> +#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
> +
> +#endif /* _INTEL_LRC_REG_H_ */
> -- 
> 2.15.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:56   ` Lucas De Marchi
@ 2018-01-22 21:28     ` Michal Wajdeczko
  2018-01-22 21:49       ` Michel Thierry
  0 siblings, 1 reply; 24+ messages in thread
From: Michal Wajdeczko @ 2018-01-22 21:28 UTC (permalink / raw)
  To: Michel Thierry, Lucas De Marchi; +Cc: intel-gfx

On Mon, 22 Jan 2018 21:56:36 +0100, Lucas De Marchi  
<lucas.demarchi@intel.com> wrote:

> On Mon, Jan 22, 2018 at 12:32:57PM -0800, Michel Thierry wrote:
>> Newer platforms may have subtle offset changes, which will increase the
>> number of defines, so it is probably better to start moving them to its
>> own header file. Also move the macros used while setting the reg state.
>>
>> v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
>> intel_guc_reg.h (Chris)
>>
>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>
> [ ... ]
>
>> diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h  
>> b/drivers/gpu/drm/i915/intel_lrc_reg.h
>> new file mode 100644
>> index 000000000000..f50d63cb4b66
>> --- /dev/null
>> +++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
>> @@ -0,0 +1,78 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2018 Intel Corporation
                    ^^^^
hmm, maybe years should be "2014-2018"

>> + *
>> + * Permission is hereby granted, free of charge, to any person  
>> obtaining a
>> + * copy of this software and associated documentation files (the  
>> "Software"),
>> + * to deal in the Software without restriction, including without  
>> limitation
>> + * the rights to use, copy, modify, merge, publish, distribute,  
>> sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom  
>> the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including  
>> the next
>> + * paragraph) shall be included in all copies or substantial portions  
>> of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  
>> EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  
>> MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT  
>> SHALL
>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES  
>> OR OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,  
>> ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>> + * DEALINGS IN THE SOFTWARE.
>> + */
>
> Looking at other files added after the SPDX change, it doesn't look
> like we should duplicate the information about license. So in this case
> AFAIU it should contain only the SPDX tag and the Copyright, but not
> license text. See
>
> git log --grep "Remove redundant license text"
>
>
> Lucas De Marchi
>

and by looking at other examples I think best practice is to put this tag
right under a copyright line:

/*
  * Copyright © 2014-2018 Intel Corporation
  *
  * SPDX-License-Identifier: MIT
  */

Michal

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-22 21:28     ` Michal Wajdeczko
@ 2018-01-22 21:49       ` Michel Thierry
  2018-01-23  0:31         ` Lucas De Marchi
  0 siblings, 1 reply; 24+ messages in thread
From: Michel Thierry @ 2018-01-22 21:49 UTC (permalink / raw)
  To: Michal Wajdeczko, Lucas De Marchi; +Cc: intel-gfx

On 22/01/18 13:28, Michal Wajdeczko wrote:
> On Mon, 22 Jan 2018 21:56:36 +0100, Lucas De Marchi 
> <lucas.demarchi@intel.com> wrote:
> 
>> On Mon, Jan 22, 2018 at 12:32:57PM -0800, Michel Thierry wrote:
>>> Newer platforms may have subtle offset changes, which will increase the
>>> number of defines, so it is probably better to start moving them to its
>>> own header file. Also move the macros used while setting the reg state.
>>>
>>> v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
>>> intel_guc_reg.h (Chris)
>>>
>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> ---
>>
>> [ ... ]
>>
>>> diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h 
>>> b/drivers/gpu/drm/i915/intel_lrc_reg.h
>>> new file mode 100644
>>> index 000000000000..f50d63cb4b66
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
>>> @@ -0,0 +1,78 @@
>>> +/* SPDX-License-Identifier: MIT */
>>> +/*
>>> + * Copyright © 2018 Intel Corporation
>                     ^^^^
> hmm, maybe years should be "2014-2018"
> 

2014 because that's when these #define were originally added?

>>> + *
>>> + * Permission is hereby granted, free of charge, to any person 
>>> obtaining a
>>> + * copy of this software and associated documentation files (the 
>>> "Software"),
>>> + * to deal in the Software without restriction, including without 
>>> limitation
>>> + * the rights to use, copy, modify, merge, publish, distribute, 
>>> sublicense,
>>> + * and/or sell copies of the Software, and to permit persons to whom 
>>> the
>>> + * Software is furnished to do so, subject to the following conditions:
>>> + *
>>> + * The above copyright notice and this permission notice (including 
>>> the next
>>> + * paragraph) shall be included in all copies or substantial 
>>> portions of the
>>> + * Software.
>>> + *
>>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
>>> EXPRESS OR
>>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
>>> MERCHANTABILITY,
>>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO 
>>> EVENT SHALL
>>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES 
>>> OR OTHER
>>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
>>> ARISING
>>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>>> + * DEALINGS IN THE SOFTWARE.
>>> + */
>>
>> Looking at other files added after the SPDX change, it doesn't look
>> like we should duplicate the information about license. So in this case
>> AFAIU it should contain only the SPDX tag and the Copyright, but not
>> license text. See
>>
>> git log --grep "Remove redundant license text"
>>
>>
>> Lucas De Marchi
>>
> 
> and by looking at other examples I think best practice is to put this tag
> right under a copyright line:
> 
> /*
>   * Copyright © 2014-2018 Intel Corporation
>   *
>   * SPDX-License-Identifier: MIT
>   */
> 

Best practice, but not the most common:

$ git grep " \* SPDX-License-Identifier:" |wc -l
94

$ git grep "/\* SPDX-License-Identifier:" |wc -l
7822

Anyway it looks ok to me, objections?

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-22 21:49       ` Michel Thierry
@ 2018-01-23  0:31         ` Lucas De Marchi
  2018-01-23  0:41           ` Michel Thierry
  0 siblings, 1 reply; 24+ messages in thread
From: Lucas De Marchi @ 2018-01-23  0:31 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx, Lucas De Marchi

On Mon, Jan 22, 2018 at 01:49:19PM -0800, Michel Thierry wrote:
> > > > diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h
> > > > b/drivers/gpu/drm/i915/intel_lrc_reg.h
> > > > new file mode 100644
> > > > index 000000000000..f50d63cb4b66
> > > > --- /dev/null
> > > > +++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
> > > > @@ -0,0 +1,78 @@
> > > > +/* SPDX-License-Identifier: MIT */
> > > > +/*
> > > > + * Copyright © 2018 Intel Corporation
> >                     ^^^^
> > hmm, maybe years should be "2014-2018"
> > 
> 
> 2014 because that's when these #define were originally added?

Because that's what is in the copyright line in that file I suppose.

> 
> > > > + *
> > > > + * Permission is hereby granted, free of charge, to any person
> > > > obtaining a
> > > > + * copy of this software and associated documentation files
> > > > (the "Software"),
> > > > + * to deal in the Software without restriction, including
> > > > without limitation
> > > > + * the rights to use, copy, modify, merge, publish, distribute,
> > > > sublicense,
> > > > + * and/or sell copies of the Software, and to permit persons to
> > > > whom the
> > > > + * Software is furnished to do so, subject to the following conditions:
> > > > + *
> > > > + * The above copyright notice and this permission notice
> > > > (including the next
> > > > + * paragraph) shall be included in all copies or substantial
> > > > portions of the
> > > > + * Software.
> > > > + *
> > > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
> > > > KIND, EXPRESS OR
> > > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > > > MERCHANTABILITY,
> > > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO
> > > > EVENT SHALL
> > > > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
> > > > DAMAGES OR OTHER
> > > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> > > > OTHERWISE, ARISING
> > > > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> > > > + * DEALINGS IN THE SOFTWARE.
> > > > + */
> > > 
> > > Looking at other files added after the SPDX change, it doesn't look
> > > like we should duplicate the information about license. So in this case
> > > AFAIU it should contain only the SPDX tag and the Copyright, but not
> > > license text. See
> > > 
> > > git log --grep "Remove redundant license text"
> > > 
> > > 
> > > Lucas De Marchi
> > > 
> > 
> > and by looking at other examples I think best practice is to put this tag
> > right under a copyright line:
> > 
> > /*
> >   * Copyright © 2014-2018 Intel Corporation
> >   *
> >   * SPDX-License-Identifier: MIT
> >   */
> > 
> 
> Best practice, but not the most common:
> 
> $ git grep " \* SPDX-License-Identifier:" |wc -l
> 94
> 
> $ git grep "/\* SPDX-License-Identifier:" |wc -l
> 7822
> 
> Anyway it looks ok to me, objections?

I remember Linus stating his preference for `// SPDX ... ' as the first
line. The copyright could then follow the comment format.  Searching now
I found this:

https://lkml.org/lkml/2017/11/2/715

(and see the thread why it was used /* rather than // in headers...
which as been fixed by 5cb0512c02ecd7e6214e912e4c150f4219ac78e0).

So for this file what I understand is that it should be:

	// SPDX-License-Identifier: MIT
	// Copyright (C) 2014-2018 Intel Corporation

Lucas De Marchi


> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23  0:31         ` Lucas De Marchi
@ 2018-01-23  0:41           ` Michel Thierry
  2018-01-23  8:48             ` Chris Wilson
  0 siblings, 1 reply; 24+ messages in thread
From: Michel Thierry @ 2018-01-23  0:41 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-gfx, Lucas De Marchi

On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
> So for this file what I understand is that it should be:
> 
> 	// SPDX-License-Identifier: MIT
> 	// Copyright (C) 2014-2018 Intel Corporation

So be it.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (3 preceding siblings ...)
  2018-01-22 20:54 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev2) Patchwork
@ 2018-01-23  0:41 ` Michel Thierry
  2018-01-23  1:00 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev3) Patchwork
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Michel Thierry @ 2018-01-23  0:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi

Newer platforms may have subtle offset changes, which will increase the
number of defines, so it is probably better to start moving them to its
own header file. Also move the macros used while setting the reg state.

v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
intel_guc_reg.h (Chris)

v3: License notice shenanigans.

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c     | 50 +------------------------------
 drivers/gpu/drm/i915/intel_lrc_reg.h | 57 ++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 49 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg.h

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 506bc2bc04f9..3cf30b982524 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -137,6 +137,7 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 #include "i915_gem_render_state.h"
+#include "intel_lrc_reg.h"
 #include "intel_mocs.h"
 
 #define RING_EXECLIST_QFULL		(1 << 0x2)
@@ -156,55 +157,6 @@
 #define GEN8_CTX_STATUS_COMPLETED_MASK \
 	 (GEN8_CTX_STATUS_COMPLETE | GEN8_CTX_STATUS_PREEMPTED)
 
-#define CTX_LRI_HEADER_0		0x01
-#define CTX_CONTEXT_CONTROL		0x02
-#define CTX_RING_HEAD			0x04
-#define CTX_RING_TAIL			0x06
-#define CTX_RING_BUFFER_START		0x08
-#define CTX_RING_BUFFER_CONTROL		0x0a
-#define CTX_BB_HEAD_U			0x0c
-#define CTX_BB_HEAD_L			0x0e
-#define CTX_BB_STATE			0x10
-#define CTX_SECOND_BB_HEAD_U		0x12
-#define CTX_SECOND_BB_HEAD_L		0x14
-#define CTX_SECOND_BB_STATE		0x16
-#define CTX_BB_PER_CTX_PTR		0x18
-#define CTX_RCS_INDIRECT_CTX		0x1a
-#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
-#define CTX_LRI_HEADER_1		0x21
-#define CTX_CTX_TIMESTAMP		0x22
-#define CTX_PDP3_UDW			0x24
-#define CTX_PDP3_LDW			0x26
-#define CTX_PDP2_UDW			0x28
-#define CTX_PDP2_LDW			0x2a
-#define CTX_PDP1_UDW			0x2c
-#define CTX_PDP1_LDW			0x2e
-#define CTX_PDP0_UDW			0x30
-#define CTX_PDP0_LDW			0x32
-#define CTX_LRI_HEADER_2		0x41
-#define CTX_R_PWR_CLK_STATE		0x42
-#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
-
-#define CTX_REG(reg_state, pos, reg, val) do { \
-	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
-	(reg_state)[(pos)+1] = (val); \
-} while (0)
-
-#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
-	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
-	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
-	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
-} while (0)
-
-#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
-	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
-	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
-} while (0)
-
-#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
-#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
-#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
-
 /* Typical size of the average request (2 pipecontrols and a MI_BB) */
 #define EXECLISTS_REQUEST_SIZE 64 /* bytes */
 #define WA_TAIL_DWORDS 2
diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h b/drivers/gpu/drm/i915/intel_lrc_reg.h
new file mode 100644
index 000000000000..875a16fdece8
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: MIT
+// Copyright © 2014-2018 Intel Corporation
+
+#ifndef _INTEL_LRC_REG_H_
+#define _INTEL_LRC_REG_H_
+
+/* GEN8+ Reg State Context */
+#define CTX_LRI_HEADER_0		0x01
+#define CTX_CONTEXT_CONTROL		0x02
+#define CTX_RING_HEAD			0x04
+#define CTX_RING_TAIL			0x06
+#define CTX_RING_BUFFER_START		0x08
+#define CTX_RING_BUFFER_CONTROL		0x0a
+#define CTX_BB_HEAD_U			0x0c
+#define CTX_BB_HEAD_L			0x0e
+#define CTX_BB_STATE			0x10
+#define CTX_SECOND_BB_HEAD_U		0x12
+#define CTX_SECOND_BB_HEAD_L		0x14
+#define CTX_SECOND_BB_STATE		0x16
+#define CTX_BB_PER_CTX_PTR		0x18
+#define CTX_RCS_INDIRECT_CTX		0x1a
+#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
+#define CTX_LRI_HEADER_1		0x21
+#define CTX_CTX_TIMESTAMP		0x22
+#define CTX_PDP3_UDW			0x24
+#define CTX_PDP3_LDW			0x26
+#define CTX_PDP2_UDW			0x28
+#define CTX_PDP2_LDW			0x2a
+#define CTX_PDP1_UDW			0x2c
+#define CTX_PDP1_LDW			0x2e
+#define CTX_PDP0_UDW			0x30
+#define CTX_PDP0_LDW			0x32
+#define CTX_LRI_HEADER_2		0x41
+#define CTX_R_PWR_CLK_STATE		0x42
+#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
+
+#define CTX_REG(reg_state, pos, reg, val) do { \
+	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
+	(reg_state)[(pos)+1] = (val); \
+} while (0)
+
+#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
+	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
+	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
+	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
+} while (0)
+
+#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
+	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
+	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
+} while (0)
+
+#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
+#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
+#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
+
+#endif /* _INTEL_LRC_REG_H_ */
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev3)
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (4 preceding siblings ...)
  2018-01-23  0:41 ` [PATCH v3] drm/i915: Move LRC register offsets to a header file Michel Thierry
@ 2018-01-23  1:00 ` Patchwork
  2018-01-23  7:46 ` ✗ Fi.CI.IGT: failure " Patchwork
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2018-01-23  1:00 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move LRC register offsets to a header file (rev3)
URL   : https://patchwork.freedesktop.org/series/36930/
State : success

== Summary ==

Series 36930v3 drm/i915: Move LRC register offsets to a header file
https://patchwork.freedesktop.org/api/1.0/series/36930/revisions/3/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:429s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:372s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:484s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:479s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:486s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:471s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:456s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:279s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:513s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:390s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:401s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:410s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:454s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:409s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:456s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:500s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:455s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:505s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:582s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:426s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:511s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:531s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:484s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:490s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:419s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:432s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:396s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:568s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:473s

06c8efda323ac918fad0e26d81e8884574ec8b84 drm-tip: 2018y-01m-22d-17h-43m-26s UTC integration manifest
41d2d900b12a drm/i915: Move LRC register offsets to a header file

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7750/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* ✗ Fi.CI.IGT: failure for drm/i915: Move LRC register offsets to a header file (rev3)
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (5 preceding siblings ...)
  2018-01-23  1:00 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev3) Patchwork
@ 2018-01-23  7:46 ` Patchwork
  2018-01-23 19:50 ` [PATCH v4] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2018-01-23  7:46 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move LRC register offsets to a header file (rev3)
URL   : https://patchwork.freedesktop.org/series/36930/
State : failure

== Summary ==

Test kms_frontbuffer_tracking:
        Subgroup fbc-tilingchange:
                fail       -> PASS       (shard-apl) fdo#103167
        Subgroup fbc-1p-offscren-pri-indfb-draw-pwrite:
                pass       -> FAIL       (shard-apl) fdo#101623 +2
Test testdisplay:
                pass       -> DMESG-WARN (shard-apl) fdo#104727
Test kms_cursor_legacy:
        Subgroup cursor-vs-flip-legacy:
                fail       -> PASS       (shard-apl) fdo#103355
Test gem_eio:
        Subgroup in-flight-external:
                fail       -> PASS       (shard-hsw) fdo#104676
Test kms_flip:
        Subgroup flip-vs-panning-vs-hang-interruptible:
                dmesg-warn -> PASS       (shard-snb) fdo#103821
Test pm_rpm:
        Subgroup gem-execbuf-stress:
                pass       -> INCOMPLETE (shard-hsw)
Test drv_suspend:
        Subgroup fence-restore-tiled2untiled-hibernate:
                fail       -> SKIP       (shard-snb) fdo#103375
Test perf:
        Subgroup oa-exponents:
                fail       -> PASS       (shard-apl) fdo#102254

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104727 https://bugs.freedesktop.org/show_bug.cgi?id=104727
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254

shard-apl        total:2753 pass:1713 dwarn:2   dfail:0   fail:25  skip:1013 time:13942s
shard-hsw        total:2728 pass:1713 dwarn:1   dfail:0   fail:10  skip:1002 time:14856s
shard-snb        total:2753 pass:1319 dwarn:1   dfail:0   fail:9   skip:1424 time:7892s
Blacklisted hosts:
shard-kbl        total:2753 pass:1842 dwarn:1   dfail:0   fail:23  skip:887 time:10683s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7750/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23  0:41           ` Michel Thierry
@ 2018-01-23  8:48             ` Chris Wilson
  2018-01-23 16:06               ` Lucas De Marchi
  0 siblings, 1 reply; 24+ messages in thread
From: Chris Wilson @ 2018-01-23  8:48 UTC (permalink / raw)
  To: Michel Thierry, Lucas De Marchi; +Cc: intel-gfx, Lucas De Marchi

Quoting Michel Thierry (2018-01-23 00:41:07)
> On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
> > So for this file what I understand is that it should be:
> > 
> >       // SPDX-License-Identifier: MIT
> >       // Copyright (C) 2014-2018 Intel Corporation
> 
> So be it.

Oh no, we don't do C++ comments.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23  8:48             ` Chris Wilson
@ 2018-01-23 16:06               ` Lucas De Marchi
  2018-01-23 16:18                 ` Michal Wajdeczko
  2018-01-23 16:28                 ` Chris Wilson
  0 siblings, 2 replies; 24+ messages in thread
From: Lucas De Marchi @ 2018-01-23 16:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Jan 23, 2018 at 08:48:01AM +0000, Chris Wilson wrote:
> Quoting Michel Thierry (2018-01-23 00:41:07)
> > On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
> > > So for this file what I understand is that it should be:
> > > 
> > >       // SPDX-License-Identifier: MIT
> > >       // Copyright (C) 2014-2018 Intel Corporation
> > 
> > So be it.
> 
> Oh no, we don't do C++ comments.

We drm or we kernel devs?

$ git grep "// SPDX"| wc -l 
4487

The suggestion was actually from Linus in the thread I linked. Quoting
here:

> So in general, the _hope_ is that we can just end up replacing
> existing boilerplate comments with that single line SPDX comment
> (using "//" in *.[ch] files, but obviously some other kinds of files
> end up having a different comment character, typically '#').
...
> And yes, feel free to replace block comments with // while at it.
...
> We already have something like 700 different versions of the same
> silly copyright license boiler-plate due to typos, whitespace
> differences, comment style choices, yadda yadda. Let's avoid that mess
> by just picking _one_ single format and placement for the SPDX line.

Which I agree with, hence my suggestion. Let me know if it should be
different in drm/


Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23 16:06               ` Lucas De Marchi
@ 2018-01-23 16:18                 ` Michal Wajdeczko
  2018-01-23 16:27                   ` Lucas De Marchi
  2018-01-23 16:28                 ` Chris Wilson
  1 sibling, 1 reply; 24+ messages in thread
From: Michal Wajdeczko @ 2018-01-23 16:18 UTC (permalink / raw)
  To: Chris Wilson, Lucas De Marchi; +Cc: intel-gfx

On Tue, 23 Jan 2018 17:06:16 +0100, Lucas De Marchi  
<lucas.demarchi@intel.com> wrote:

> On Tue, Jan 23, 2018 at 08:48:01AM +0000, Chris Wilson wrote:
>> Quoting Michel Thierry (2018-01-23 00:41:07)
>> > On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
>> > > So for this file what I understand is that it should be:
>> > >
>> > >       // SPDX-License-Identifier: MIT
>> > >       // Copyright (C) 2014-2018 Intel Corporation
>> >
>> > So be it.
>>
>> Oh no, we don't do C++ comments.
>
> We drm or we kernel devs?
>
> $ git grep "// SPDX"| wc -l
> 4487
>

But on the other hand:

$ git grep "/* SPDX" | wc -l
14087

> The suggestion was actually from Linus in the thread I linked. Quoting
> here:
>
>> So in general, the _hope_ is that we can just end up replacing
>> existing boilerplate comments with that single line SPDX comment
>> (using "//" in *.[ch] files, but obviously some other kinds of files
>> end up having a different comment character, typically '#').
> ...
>> And yes, feel free to replace block comments with // while at it.
> ...
>> We already have something like 700 different versions of the same
>> silly copyright license boiler-plate due to typos, whitespace
>> differences, comment style choices, yadda yadda. Let's avoid that mess
>> by just picking _one_ single format and placement for the SPDX line.
>
> Which I agree with, hence my suggestion. Let me know if it should be
> different in drm/
>
>
> Lucas De Marchi
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23 16:18                 ` Michal Wajdeczko
@ 2018-01-23 16:27                   ` Lucas De Marchi
  0 siblings, 0 replies; 24+ messages in thread
From: Lucas De Marchi @ 2018-01-23 16:27 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

On Tue, Jan 23, 2018 at 05:18:36PM +0100, Michal Wajdeczko wrote:
> On Tue, 23 Jan 2018 17:06:16 +0100, Lucas De Marchi
> <lucas.demarchi@intel.com> wrote:
> 
> > On Tue, Jan 23, 2018 at 08:48:01AM +0000, Chris Wilson wrote:
> > > Quoting Michel Thierry (2018-01-23 00:41:07)
> > > > On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
> > > > > So for this file what I understand is that it should be:
> > > > >
> > > > >       // SPDX-License-Identifier: MIT
> > > > >       // Copyright (C) 2014-2018 Intel Corporation
> > > >
> > > > So be it.
> > > 
> > > Oh no, we don't do C++ comments.
> > 
> > We drm or we kernel devs?
> > 
> > $ git grep "// SPDX"| wc -l
> > 4487
> > 
> 
> But on the other hand:
> 
> $ git grep "/* SPDX" | wc -l
> 14087

Yes, because initially during the conversion it was thought // couldn't
be in headers, but in the end it was actually a build system bug.

Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23 16:06               ` Lucas De Marchi
  2018-01-23 16:18                 ` Michal Wajdeczko
@ 2018-01-23 16:28                 ` Chris Wilson
  2018-01-24 10:13                   ` Jani Nikula
  1 sibling, 1 reply; 24+ messages in thread
From: Chris Wilson @ 2018-01-23 16:28 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: intel-gfx

Quoting Lucas De Marchi (2018-01-23 16:06:16)
> On Tue, Jan 23, 2018 at 08:48:01AM +0000, Chris Wilson wrote:
> > Quoting Michel Thierry (2018-01-23 00:41:07)
> > > On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
> > > > So for this file what I understand is that it should be:
> > > > 
> > > >       // SPDX-License-Identifier: MIT
> > > >       // Copyright (C) 2014-2018 Intel Corporation
> > > 
> > > So be it.
> > 
> > Oh no, we don't do C++ comments.
> 
> We drm or we kernel devs?
> 
> $ git grep "// SPDX"| wc -l 
> 4487
> 
> The suggestion was actually from Linus in the thread I linked. Quoting
> here:
> 
> > So in general, the _hope_ is that we can just end up replacing
> > existing boilerplate comments with that single line SPDX comment
> > (using "//" in *.[ch] files, but obviously some other kinds of files
> > end up having a different comment character, typically '#').
> ...
> > And yes, feel free to replace block comments with // while at it.
> ...
> > We already have something like 700 different versions of the same
> > silly copyright license boiler-plate due to typos, whitespace
> > differences, comment style choices, yadda yadda. Let's avoid that mess
> > by just picking _one_ single format and placement for the SPDX line.
> 
> Which I agree with, hence my suggestion. Let me know if it should be
> different in drm/

Being consistent is far more important.
Documentation/process/coding-style.rst is what we follow, breaking the
rule and being inconsistent for copyright headers doesn't make any sense.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v4] drm/i915: Move LRC register offsets to a header file
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (6 preceding siblings ...)
  2018-01-23  7:46 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-01-23 19:50 ` Michel Thierry
  2018-01-23 20:57   ` Chris Wilson
  2018-01-23 20:09 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev4) Patchwork
  2018-01-24  4:52 ` ✓ Fi.CI.IGT: " Patchwork
  9 siblings, 1 reply; 24+ messages in thread
From: Michel Thierry @ 2018-01-23 19:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi

Newer platforms may have subtle offset changes, which will increase the
number of defines, so it is probably better to start moving them to its
own header file. Also move the macros used while setting the reg state.

v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
intel_guc_reg.h (Chris)

v3: License notice shenanigans.

v4: Documentation/process/coding-style.rst is always right (Chris)

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c     | 50 +-----------------------------
 drivers/gpu/drm/i915/intel_lrc_reg.h | 60 ++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 49 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg.h

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index bb6debbeebc0..68d777272e1b 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -137,6 +137,7 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 #include "i915_gem_render_state.h"
+#include "intel_lrc_reg.h"
 #include "intel_mocs.h"
 
 #define RING_EXECLIST_QFULL		(1 << 0x2)
@@ -156,55 +157,6 @@
 #define GEN8_CTX_STATUS_COMPLETED_MASK \
 	 (GEN8_CTX_STATUS_COMPLETE | GEN8_CTX_STATUS_PREEMPTED)
 
-#define CTX_LRI_HEADER_0		0x01
-#define CTX_CONTEXT_CONTROL		0x02
-#define CTX_RING_HEAD			0x04
-#define CTX_RING_TAIL			0x06
-#define CTX_RING_BUFFER_START		0x08
-#define CTX_RING_BUFFER_CONTROL		0x0a
-#define CTX_BB_HEAD_U			0x0c
-#define CTX_BB_HEAD_L			0x0e
-#define CTX_BB_STATE			0x10
-#define CTX_SECOND_BB_HEAD_U		0x12
-#define CTX_SECOND_BB_HEAD_L		0x14
-#define CTX_SECOND_BB_STATE		0x16
-#define CTX_BB_PER_CTX_PTR		0x18
-#define CTX_RCS_INDIRECT_CTX		0x1a
-#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
-#define CTX_LRI_HEADER_1		0x21
-#define CTX_CTX_TIMESTAMP		0x22
-#define CTX_PDP3_UDW			0x24
-#define CTX_PDP3_LDW			0x26
-#define CTX_PDP2_UDW			0x28
-#define CTX_PDP2_LDW			0x2a
-#define CTX_PDP1_UDW			0x2c
-#define CTX_PDP1_LDW			0x2e
-#define CTX_PDP0_UDW			0x30
-#define CTX_PDP0_LDW			0x32
-#define CTX_LRI_HEADER_2		0x41
-#define CTX_R_PWR_CLK_STATE		0x42
-#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
-
-#define CTX_REG(reg_state, pos, reg, val) do { \
-	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
-	(reg_state)[(pos)+1] = (val); \
-} while (0)
-
-#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
-	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
-	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
-	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
-} while (0)
-
-#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
-	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
-	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
-} while (0)
-
-#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
-#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
-#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
-
 /* Typical size of the average request (2 pipecontrols and a MI_BB) */
 #define EXECLISTS_REQUEST_SIZE 64 /* bytes */
 #define WA_TAIL_DWORDS 2
diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h b/drivers/gpu/drm/i915/intel_lrc_reg.h
new file mode 100644
index 000000000000..7dc53707ef1a
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_lrc_reg.h
@@ -0,0 +1,60 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright © 2014-2018 Intel Corporation
+ */
+
+#ifndef _INTEL_LRC_REG_H_
+#define _INTEL_LRC_REG_H_
+
+/* GEN8+ Reg State Context */
+#define CTX_LRI_HEADER_0		0x01
+#define CTX_CONTEXT_CONTROL		0x02
+#define CTX_RING_HEAD			0x04
+#define CTX_RING_TAIL			0x06
+#define CTX_RING_BUFFER_START		0x08
+#define CTX_RING_BUFFER_CONTROL		0x0a
+#define CTX_BB_HEAD_U			0x0c
+#define CTX_BB_HEAD_L			0x0e
+#define CTX_BB_STATE			0x10
+#define CTX_SECOND_BB_HEAD_U		0x12
+#define CTX_SECOND_BB_HEAD_L		0x14
+#define CTX_SECOND_BB_STATE		0x16
+#define CTX_BB_PER_CTX_PTR		0x18
+#define CTX_RCS_INDIRECT_CTX		0x1a
+#define CTX_RCS_INDIRECT_CTX_OFFSET	0x1c
+#define CTX_LRI_HEADER_1		0x21
+#define CTX_CTX_TIMESTAMP		0x22
+#define CTX_PDP3_UDW			0x24
+#define CTX_PDP3_LDW			0x26
+#define CTX_PDP2_UDW			0x28
+#define CTX_PDP2_LDW			0x2a
+#define CTX_PDP1_UDW			0x2c
+#define CTX_PDP1_LDW			0x2e
+#define CTX_PDP0_UDW			0x30
+#define CTX_PDP0_LDW			0x32
+#define CTX_LRI_HEADER_2		0x41
+#define CTX_R_PWR_CLK_STATE		0x42
+#define CTX_GPGPU_CSR_BASE_ADDRESS	0x44
+
+#define CTX_REG(reg_state, pos, reg, val) do { \
+	(reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
+	(reg_state)[(pos)+1] = (val); \
+} while (0)
+
+#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {		\
+	const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n));	\
+	reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
+	reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \
+} while (0)
+
+#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
+	reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
+	reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \
+} while (0)
+
+#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
+#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
+#define GEN10_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x19
+
+#endif /* _INTEL_LRC_REG_H_ */
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev4)
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (7 preceding siblings ...)
  2018-01-23 19:50 ` [PATCH v4] drm/i915: Move LRC register offsets to a header file Michel Thierry
@ 2018-01-23 20:09 ` Patchwork
  2018-01-24  4:52 ` ✓ Fi.CI.IGT: " Patchwork
  9 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2018-01-23 20:09 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move LRC register offsets to a header file (rev4)
URL   : https://patchwork.freedesktop.org/series/36930/
State : success

== Summary ==

Series 36930v4 drm/i915: Move LRC register offsets to a header file
https://patchwork.freedesktop.org/api/1.0/series/36930/revisions/4/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                fail       -> PASS       (fi-gdg-551) fdo#102575

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:418s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:372s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:484s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:478s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:480s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:467s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:456s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:180  dwarn:0   dfail:0   fail:0   skip:108 time:280s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:512s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:391s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:399s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:409s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:449s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:412s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:460s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:496s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:454s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:572s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:430s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:509s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:528s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:484s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:478s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:421s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:524s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:398s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:569s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:469s
fi-bdw-gvtdvm failed to collect. IGT log at Patchwork_7757/fi-bdw-gvtdvm/igt.log

5e022f5f329c7909cb9aa938364072329f694fb2 drm-tip: 2018y-01m-23d-17h-29m-20s UTC integration manifest
ecefca426ef3 drm/i915: Move LRC register offsets to a header file

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7757/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v4] drm/i915: Move LRC register offsets to a header file
  2018-01-23 19:50 ` [PATCH v4] drm/i915: Move LRC register offsets to a header file Michel Thierry
@ 2018-01-23 20:57   ` Chris Wilson
  0 siblings, 0 replies; 24+ messages in thread
From: Chris Wilson @ 2018-01-23 20:57 UTC (permalink / raw)
  To: Michel Thierry, intel-gfx; +Cc: Lucas De Marchi

Quoting Michel Thierry (2018-01-23 19:50:57)
> Newer platforms may have subtle offset changes, which will increase the
> number of defines, so it is probably better to start moving them to its
> own header file. Also move the macros used while setting the reg state.
> 
> v2: Rename to intel_lrc_reg.h, to be consistent with i915_reg.h and
> intel_guc_reg.h (Chris)
> 
> v3: License notice shenanigans.
> 
> v4: Documentation/process/coding-style.rst is always right (Chris)
> 
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> +#define CTX_REG(reg_state, pos, reg, val) do { \
> +       (reg_state)[(pos)+0] = i915_mmio_reg_offset(reg); \
> +       (reg_state)[(pos)+1] = (val); \
> +} while (0)
> +
> +#define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do {               \
> +       const u64 _addr = i915_page_dir_dma_addr((ppgtt), (n)); \
> +       reg_state[CTX_PDP ## n ## _UDW+1] = upper_32_bits(_addr); \
> +       reg_state[CTX_PDP ## n ## _LDW+1] = lower_32_bits(_addr); \

I know this is a mechanical copy, but we should (reg_state)
nevertheless. We might as well go the extra step and do
u32 regs__ = (reg_state); to silence checkpatch (and pos__).

> +} while (0)
> +
> +#define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \
> +       reg_state[CTX_PDP0_UDW + 1] = upper_32_bits(px_dma(&ppgtt->pml4)); \
> +       reg_state[CTX_PDP0_LDW + 1] = lower_32_bits(px_dma(&ppgtt->pml4)); \

const u64 addr__ = px_dma() as well.

The jury is out on whether this should be one or two patches. Perfection
would probably be the checkpatch corrections followed by the move (that
way, CI shouldn't complain about the violations).
-Chris

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: Move LRC register offsets to a header file (rev4)
  2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
                   ` (8 preceding siblings ...)
  2018-01-23 20:09 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev4) Patchwork
@ 2018-01-24  4:52 ` Patchwork
  9 siblings, 0 replies; 24+ messages in thread
From: Patchwork @ 2018-01-24  4:52 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move LRC register offsets to a header file (rev4)
URL   : https://patchwork.freedesktop.org/series/36930/
State : success

== Summary ==

Test kms_flip:
        Subgroup flip-vs-expired-vblank-interruptible:
                fail       -> PASS       (shard-hsw) fdo#102887
        Subgroup vblank-vs-modeset-suspend:
                pass       -> FAIL       (shard-snb) fdo#102365 +1
        Subgroup 2x-plain-flip-fb-recreate:
                fail       -> PASS       (shard-hsw)
        Subgroup plain-flip-fb-recreate-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#100368
Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                pass       -> INCOMPLETE (shard-hsw) fdo#103375
        Subgroup cursor-128x128-suspend:
                pass       -> INCOMPLETE (shard-hsw) fdo#103540
Test perf:
        Subgroup oa-exponents:
                pass       -> FAIL       (shard-apl) fdo#102254
        Subgroup buffer-fill:
                pass       -> FAIL       (shard-apl) fdo#103755
        Subgroup blocking:
                pass       -> FAIL       (shard-hsw) fdo#102252
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047

fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047

shard-apl        total:2753 pass:1715 dwarn:1   dfail:0   fail:24  skip:1013 time:14028s
shard-hsw        total:2639 pass:1655 dwarn:1   dfail:0   fail:12  skip:968 time:14280s
shard-snb        total:2753 pass:1318 dwarn:1   dfail:0   fail:11  skip:1423 time:7905s
Blacklisted hosts:
shard-kbl        total:2735 pass:1817 dwarn:4   dfail:1   fail:23  skip:889 time:10759s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7757/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2] drm/i915: Move LRC register offsets to a header file
  2018-01-23 16:28                 ` Chris Wilson
@ 2018-01-24 10:13                   ` Jani Nikula
  0 siblings, 0 replies; 24+ messages in thread
From: Jani Nikula @ 2018-01-24 10:13 UTC (permalink / raw)
  To: Chris Wilson, Lucas De Marchi; +Cc: intel-gfx

On Tue, 23 Jan 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Lucas De Marchi (2018-01-23 16:06:16)
>> On Tue, Jan 23, 2018 at 08:48:01AM +0000, Chris Wilson wrote:
>> > Quoting Michel Thierry (2018-01-23 00:41:07)
>> > > On 1/22/2018 4:31 PM, Lucas De Marchi wrote:
>> > > > So for this file what I understand is that it should be:
>> > > > 
>> > > >       // SPDX-License-Identifier: MIT
>> > > >       // Copyright (C) 2014-2018 Intel Corporation
>> > > 
>> > > So be it.
>> > 
>> > Oh no, we don't do C++ comments.
>> 
>> We drm or we kernel devs?
>> 
>> $ git grep "// SPDX"| wc -l 
>> 4487
>> 
>> The suggestion was actually from Linus in the thread I linked. Quoting
>> here:
>> 
>> > So in general, the _hope_ is that we can just end up replacing
>> > existing boilerplate comments with that single line SPDX comment
>> > (using "//" in *.[ch] files, but obviously some other kinds of files
>> > end up having a different comment character, typically '#').
>> ...
>> > And yes, feel free to replace block comments with // while at it.
>> ...
>> > We already have something like 700 different versions of the same
>> > silly copyright license boiler-plate due to typos, whitespace
>> > differences, comment style choices, yadda yadda. Let's avoid that mess
>> > by just picking _one_ single format and placement for the SPDX line.
>> 
>> Which I agree with, hence my suggestion. Let me know if it should be
>> different in drm/
>
> Being consistent is far more important.
> Documentation/process/coding-style.rst is what we follow, breaking the
> rule and being inconsistent for copyright headers doesn't make any sense.

Please use /* */ rather than // in i915 throughout.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-01-24 10:08 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 20:06 [PATCH] drm/i915: Move LRC register offsets to a header file Michel Thierry
2018-01-22 20:14 ` Chris Wilson
2018-01-22 20:26   ` Michel Thierry
2018-01-22 20:26 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-22 20:32 ` [PATCH v2] " Michel Thierry
2018-01-22 20:56   ` Lucas De Marchi
2018-01-22 21:28     ` Michal Wajdeczko
2018-01-22 21:49       ` Michel Thierry
2018-01-23  0:31         ` Lucas De Marchi
2018-01-23  0:41           ` Michel Thierry
2018-01-23  8:48             ` Chris Wilson
2018-01-23 16:06               ` Lucas De Marchi
2018-01-23 16:18                 ` Michal Wajdeczko
2018-01-23 16:27                   ` Lucas De Marchi
2018-01-23 16:28                 ` Chris Wilson
2018-01-24 10:13                   ` Jani Nikula
2018-01-22 20:54 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev2) Patchwork
2018-01-23  0:41 ` [PATCH v3] drm/i915: Move LRC register offsets to a header file Michel Thierry
2018-01-23  1:00 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev3) Patchwork
2018-01-23  7:46 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-23 19:50 ` [PATCH v4] drm/i915: Move LRC register offsets to a header file Michel Thierry
2018-01-23 20:57   ` Chris Wilson
2018-01-23 20:09 ` ✓ Fi.CI.BAT: success for drm/i915: Move LRC register offsets to a header file (rev4) Patchwork
2018-01-24  4:52 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.