All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/perf: fix build where system headers don't have Gen8 formats
@ 2017-08-04 13:21 Lionel Landwerlin
  2017-08-04 13:27 ` Petri Latvala
  0 siblings, 1 reply; 4+ messages in thread
From: Lionel Landwerlin @ 2017-08-04 13:21 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 tests/perf.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index f0ec26dd..aa6358d3 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -143,6 +143,13 @@ enum drm_i915_perf_record_type {
 };
 #endif /* !DRM_I915_PERF_OPEN */
 
+/* There is no ifdef we can use for those formats :( */
+enum {
+	local_I915_OA_FORMAT_A12 = I915_OA_FORMAT_A12,
+	local_I915_OA_FORMAT_A12_B8_C8 = I915_OA_FORMAT_A12_B8_C8,
+	local_I915_OA_FORMAT_A32u40_A4u32_B8_C8 = I915_OA_FORMAT_A32u40_A4u32_B8_C8,
+};
+
 #ifndef DRM_IOCTL_I915_PERF_ADD_CONFIG
 
 #define DRM_I915_PERF_ADD_CONFIG	0x37
@@ -230,17 +237,17 @@ static struct {
 
 	/* Gen8+ */
 
-	[I915_OA_FORMAT_A12] = {
+	[local_I915_OA_FORMAT_A12] = {
 		"A12", .size = 64,
 		.a_off = 12, .n_a = 12, .first_a = 7,
 		.min_gen = 8 },
-	[I915_OA_FORMAT_A12_B8_C8] = {
+	[local_I915_OA_FORMAT_A12_B8_C8] = {
 		"A12_B8_C8", .size = 128,
 		.a_off = 12, .n_a = 12,
 		.b_off = 64, .n_b = 8,
 		.c_off = 96, .n_c = 8, .first_a = 7,
 		.min_gen = 8 },
-	[I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+	[local_I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
 		"A32u40_A4u32_B8_C8", .size = 256,
 		.a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
 		.a_off = 144, .n_a = 4, .first_a = 32,
-- 
2.13.3

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

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

* Re: [PATCH i-g-t] tests/perf: fix build where system headers don't have Gen8 formats
  2017-08-04 13:21 [PATCH i-g-t] tests/perf: fix build where system headers don't have Gen8 formats Lionel Landwerlin
@ 2017-08-04 13:27 ` Petri Latvala
  2017-08-04 14:00   ` [PATCH v2 " Lionel Landwerlin
  0 siblings, 1 reply; 4+ messages in thread
From: Petri Latvala @ 2017-08-04 13:27 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

On Fri, Aug 04, 2017 at 02:21:36PM +0100, Lionel Landwerlin wrote:
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  tests/perf.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/perf.c b/tests/perf.c
> index f0ec26dd..aa6358d3 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -143,6 +143,13 @@ enum drm_i915_perf_record_type {
>  };
>  #endif /* !DRM_I915_PERF_OPEN */
>  
> +/* There is no ifdef we can use for those formats :( */
> +enum {
> +	local_I915_OA_FORMAT_A12 = I915_OA_FORMAT_A12,
> +	local_I915_OA_FORMAT_A12_B8_C8 = I915_OA_FORMAT_A12_B8_C8,
> +	local_I915_OA_FORMAT_A32u40_A4u32_B8_C8 = I915_OA_FORMAT_A32u40_A4u32_B8_C8,
> +};
> +


The whole point is that we don't have I915_OA_FORMAT_A12, you can't
use that for the value of local_I915_OA_FORMAT_A12, etc. You need to use the number.


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

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

* [PATCH v2 i-g-t] tests/perf: fix build where system headers don't have Gen8 formats
  2017-08-04 13:27 ` Petri Latvala
@ 2017-08-04 14:00   ` Lionel Landwerlin
  2017-08-04 14:50     ` Daniel Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Lionel Landwerlin @ 2017-08-04 14:00 UTC (permalink / raw)
  To: intel-gfx

v2: Use previous enum to define the new Gen8 enums (Petri)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 tests/perf.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index f0ec26dd..23f7f1af 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -143,6 +143,13 @@ enum drm_i915_perf_record_type {
 };
 #endif /* !DRM_I915_PERF_OPEN */

+/* There is no ifdef we can use for those formats :( */
+enum {
+	local_I915_OA_FORMAT_A12 = I915_OA_FORMAT_C4_B8 + 1,
+	local_I915_OA_FORMAT_A12_B8_C8 = I915_OA_FORMAT_A12 + 2,
+	local_I915_OA_FORMAT_A32u40_A4u32_B8_C8 = I915_OA_FORMAT_C4_B8 + 3,
+};
+
 #ifndef DRM_IOCTL_I915_PERF_ADD_CONFIG

 #define DRM_I915_PERF_ADD_CONFIG	0x37
@@ -230,17 +237,17 @@ static struct {

 	/* Gen8+ */

-	[I915_OA_FORMAT_A12] = {
+	[local_I915_OA_FORMAT_A12] = {
 		"A12", .size = 64,
 		.a_off = 12, .n_a = 12, .first_a = 7,
 		.min_gen = 8 },
-	[I915_OA_FORMAT_A12_B8_C8] = {
+	[local_I915_OA_FORMAT_A12_B8_C8] = {
 		"A12_B8_C8", .size = 128,
 		.a_off = 12, .n_a = 12,
 		.b_off = 64, .n_b = 8,
 		.c_off = 96, .n_c = 8, .first_a = 7,
 		.min_gen = 8 },
-	[I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+	[local_I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
 		"A32u40_A4u32_B8_C8", .size = 256,
 		.a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
 		.a_off = 144, .n_a = 4, .first_a = 32,
--
2.13.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 i-g-t] tests/perf: fix build where system headers don't have Gen8 formats
  2017-08-04 14:00   ` [PATCH v2 " Lionel Landwerlin
@ 2017-08-04 14:50     ` Daniel Stone
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Stone @ 2017-08-04 14:50 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

On 4 August 2017 at 15:00, Lionel Landwerlin
<lionel.g.landwerlin@intel.com> wrote:
> v2: Use previous enum to define the new Gen8 enums (Petri)
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Tested-by: Daniel Stone <daniels@collabora.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-08-04 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-04 13:21 [PATCH i-g-t] tests/perf: fix build where system headers don't have Gen8 formats Lionel Landwerlin
2017-08-04 13:27 ` Petri Latvala
2017-08-04 14:00   ` [PATCH v2 " Lionel Landwerlin
2017-08-04 14:50     ` Daniel Stone

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.