* [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h
@ 2018-11-15 12:01 Jani Nikula
2018-11-15 12:01 ` [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
` (8 more replies)
0 siblings, 9 replies; 18+ messages in thread
From: Jani Nikula @ 2018-11-15 12:01 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Reduce bloat in one of the bigger header files. Fix some indentation
while at it. No functional changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 139 +------------------------------------
drivers/gpu/drm/i915/i915_fixed.h | 142 ++++++++++++++++++++++++++++++++++++++
2 files changed, 143 insertions(+), 138 deletions(-)
create mode 100644 drivers/gpu/drm/i915/i915_fixed.h
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 5d686b585a95..9ef675428295 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -54,6 +54,7 @@
#include <drm/drm_cache.h>
#include <drm/drm_util.h>
+#include "i915_fixed.h"
#include "i915_params.h"
#include "i915_reg.h"
#include "i915_utils.h"
@@ -127,144 +128,6 @@ bool i915_error_injected(void);
__i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \
fmt, ##__VA_ARGS__)
-typedef struct {
- uint32_t val;
-} uint_fixed_16_16_t;
-
-#define FP_16_16_MAX ({ \
- uint_fixed_16_16_t fp; \
- fp.val = UINT_MAX; \
- fp; \
-})
-
-static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
-{
- if (val.val == 0)
- return true;
- return false;
-}
-
-static inline uint_fixed_16_16_t u32_to_fixed16(uint32_t val)
-{
- uint_fixed_16_16_t fp;
-
- WARN_ON(val > U16_MAX);
-
- fp.val = val << 16;
- return fp;
-}
-
-static inline uint32_t fixed16_to_u32_round_up(uint_fixed_16_16_t fp)
-{
- return DIV_ROUND_UP(fp.val, 1 << 16);
-}
-
-static inline uint32_t fixed16_to_u32(uint_fixed_16_16_t fp)
-{
- return fp.val >> 16;
-}
-
-static inline uint_fixed_16_16_t min_fixed16(uint_fixed_16_16_t min1,
- uint_fixed_16_16_t min2)
-{
- uint_fixed_16_16_t min;
-
- min.val = min(min1.val, min2.val);
- return min;
-}
-
-static inline uint_fixed_16_16_t max_fixed16(uint_fixed_16_16_t max1,
- uint_fixed_16_16_t max2)
-{
- uint_fixed_16_16_t max;
-
- max.val = max(max1.val, max2.val);
- return max;
-}
-
-static inline uint_fixed_16_16_t clamp_u64_to_fixed16(uint64_t val)
-{
- uint_fixed_16_16_t fp;
- WARN_ON(val > U32_MAX);
- fp.val = (uint32_t) val;
- return fp;
-}
-
-static inline uint32_t div_round_up_fixed16(uint_fixed_16_16_t val,
- uint_fixed_16_16_t d)
-{
- return DIV_ROUND_UP(val.val, d.val);
-}
-
-static inline uint32_t mul_round_up_u32_fixed16(uint32_t val,
- uint_fixed_16_16_t mul)
-{
- uint64_t intermediate_val;
-
- intermediate_val = (uint64_t) val * mul.val;
- intermediate_val = DIV_ROUND_UP_ULL(intermediate_val, 1 << 16);
- WARN_ON(intermediate_val > U32_MAX);
- return (uint32_t) intermediate_val;
-}
-
-static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,
- uint_fixed_16_16_t mul)
-{
- uint64_t intermediate_val;
-
- intermediate_val = (uint64_t) val.val * mul.val;
- intermediate_val = intermediate_val >> 16;
- return clamp_u64_to_fixed16(intermediate_val);
-}
-
-static inline uint_fixed_16_16_t div_fixed16(uint32_t val, uint32_t d)
-{
- uint64_t interm_val;
-
- interm_val = (uint64_t)val << 16;
- interm_val = DIV_ROUND_UP_ULL(interm_val, d);
- return clamp_u64_to_fixed16(interm_val);
-}
-
-static inline uint32_t div_round_up_u32_fixed16(uint32_t val,
- uint_fixed_16_16_t d)
-{
- uint64_t interm_val;
-
- interm_val = (uint64_t)val << 16;
- interm_val = DIV_ROUND_UP_ULL(interm_val, d.val);
- WARN_ON(interm_val > U32_MAX);
- return (uint32_t) interm_val;
-}
-
-static inline uint_fixed_16_16_t mul_u32_fixed16(uint32_t val,
- uint_fixed_16_16_t mul)
-{
- uint64_t intermediate_val;
-
- intermediate_val = (uint64_t) val * mul.val;
- return clamp_u64_to_fixed16(intermediate_val);
-}
-
-static inline uint_fixed_16_16_t add_fixed16(uint_fixed_16_16_t add1,
- uint_fixed_16_16_t add2)
-{
- uint64_t interm_sum;
-
- interm_sum = (uint64_t) add1.val + add2.val;
- return clamp_u64_to_fixed16(interm_sum);
-}
-
-static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1,
- uint32_t add2)
-{
- uint64_t interm_sum;
- uint_fixed_16_16_t interm_add2 = u32_to_fixed16(add2);
-
- interm_sum = (uint64_t) add1.val + interm_add2.val;
- return clamp_u64_to_fixed16(interm_sum);
-}
-
enum hpd_pin {
HPD_NONE = 0,
HPD_TV = HPD_NONE, /* TV is known to be unreliable */
diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
new file mode 100644
index 000000000000..cfeff89fa38a
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -0,0 +1,142 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2018 Intel Corporation
+ */
+
+typedef struct {
+ uint32_t val;
+} uint_fixed_16_16_t;
+
+#define FP_16_16_MAX ({ \
+ uint_fixed_16_16_t fp; \
+ fp.val = UINT_MAX; \
+ fp; \
+})
+
+static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
+{
+ if (val.val == 0)
+ return true;
+ return false;
+}
+
+static inline uint_fixed_16_16_t u32_to_fixed16(uint32_t val)
+{
+ uint_fixed_16_16_t fp;
+
+ WARN_ON(val > U16_MAX);
+
+ fp.val = val << 16;
+ return fp;
+}
+
+static inline uint32_t fixed16_to_u32_round_up(uint_fixed_16_16_t fp)
+{
+ return DIV_ROUND_UP(fp.val, 1 << 16);
+}
+
+static inline uint32_t fixed16_to_u32(uint_fixed_16_16_t fp)
+{
+ return fp.val >> 16;
+}
+
+static inline uint_fixed_16_16_t min_fixed16(uint_fixed_16_16_t min1,
+ uint_fixed_16_16_t min2)
+{
+ uint_fixed_16_16_t min;
+
+ min.val = min(min1.val, min2.val);
+ return min;
+}
+
+static inline uint_fixed_16_16_t max_fixed16(uint_fixed_16_16_t max1,
+ uint_fixed_16_16_t max2)
+{
+ uint_fixed_16_16_t max;
+
+ max.val = max(max1.val, max2.val);
+ return max;
+}
+
+static inline uint_fixed_16_16_t clamp_u64_to_fixed16(uint64_t val)
+{
+ uint_fixed_16_16_t fp;
+ WARN_ON(val > U32_MAX);
+ fp.val = (uint32_t) val;
+ return fp;
+}
+
+static inline uint32_t div_round_up_fixed16(uint_fixed_16_16_t val,
+ uint_fixed_16_16_t d)
+{
+ return DIV_ROUND_UP(val.val, d.val);
+}
+
+static inline uint32_t mul_round_up_u32_fixed16(uint32_t val,
+ uint_fixed_16_16_t mul)
+{
+ uint64_t intermediate_val;
+
+ intermediate_val = (uint64_t) val * mul.val;
+ intermediate_val = DIV_ROUND_UP_ULL(intermediate_val, 1 << 16);
+ WARN_ON(intermediate_val > U32_MAX);
+ return (uint32_t) intermediate_val;
+}
+
+static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,
+ uint_fixed_16_16_t mul)
+{
+ uint64_t intermediate_val;
+
+ intermediate_val = (uint64_t) val.val * mul.val;
+ intermediate_val = intermediate_val >> 16;
+ return clamp_u64_to_fixed16(intermediate_val);
+}
+
+static inline uint_fixed_16_16_t div_fixed16(uint32_t val, uint32_t d)
+{
+ uint64_t interm_val;
+
+ interm_val = (uint64_t)val << 16;
+ interm_val = DIV_ROUND_UP_ULL(interm_val, d);
+ return clamp_u64_to_fixed16(interm_val);
+}
+
+static inline uint32_t div_round_up_u32_fixed16(uint32_t val,
+ uint_fixed_16_16_t d)
+{
+ uint64_t interm_val;
+
+ interm_val = (uint64_t)val << 16;
+ interm_val = DIV_ROUND_UP_ULL(interm_val, d.val);
+ WARN_ON(interm_val > U32_MAX);
+ return (uint32_t) interm_val;
+}
+
+static inline uint_fixed_16_16_t mul_u32_fixed16(uint32_t val,
+ uint_fixed_16_16_t mul)
+{
+ uint64_t intermediate_val;
+
+ intermediate_val = (uint64_t) val * mul.val;
+ return clamp_u64_to_fixed16(intermediate_val);
+}
+
+static inline uint_fixed_16_16_t add_fixed16(uint_fixed_16_16_t add1,
+ uint_fixed_16_16_t add2)
+{
+ uint64_t interm_sum;
+
+ interm_sum = (uint64_t) add1.val + add2.val;
+ return clamp_u64_to_fixed16(interm_sum);
+}
+
+static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1,
+ uint32_t add2)
+{
+ uint64_t interm_sum;
+ uint_fixed_16_16_t interm_add2 = u32_to_fixed16(add2);
+
+ interm_sum = (uint64_t) add1.val + interm_add2.val;
+ return clamp_u64_to_fixed16(interm_sum);
+}
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
@ 2018-11-15 12:01 ` Jani Nikula
2018-11-16 10:38 ` Joonas Lahtinen
2018-11-15 12:01 ` [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition Jani Nikula
` (7 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2018-11-15 12:01 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
While at it, conform to kernel spacing (i.e. no space) after cast. No
functional changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_fixed.h | 61 +++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 32 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
index cfeff89fa38a..08316e50167a 100644
--- a/drivers/gpu/drm/i915/i915_fixed.h
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -4,7 +4,7 @@
*/
typedef struct {
- uint32_t val;
+ u32 val;
} uint_fixed_16_16_t;
#define FP_16_16_MAX ({ \
@@ -20,7 +20,7 @@ static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
return false;
}
-static inline uint_fixed_16_16_t u32_to_fixed16(uint32_t val)
+static inline uint_fixed_16_16_t u32_to_fixed16(u32 val)
{
uint_fixed_16_16_t fp;
@@ -30,12 +30,12 @@ static inline uint_fixed_16_16_t u32_to_fixed16(uint32_t val)
return fp;
}
-static inline uint32_t fixed16_to_u32_round_up(uint_fixed_16_16_t fp)
+static inline u32 fixed16_to_u32_round_up(uint_fixed_16_16_t fp)
{
return DIV_ROUND_UP(fp.val, 1 << 16);
}
-static inline uint32_t fixed16_to_u32(uint_fixed_16_16_t fp)
+static inline u32 fixed16_to_u32(uint_fixed_16_16_t fp)
{
return fp.val >> 16;
}
@@ -58,85 +58,82 @@ static inline uint_fixed_16_16_t max_fixed16(uint_fixed_16_16_t max1,
return max;
}
-static inline uint_fixed_16_16_t clamp_u64_to_fixed16(uint64_t val)
+static inline uint_fixed_16_16_t clamp_u64_to_fixed16(u64 val)
{
uint_fixed_16_16_t fp;
WARN_ON(val > U32_MAX);
- fp.val = (uint32_t) val;
+ fp.val = (u32)val;
return fp;
}
-static inline uint32_t div_round_up_fixed16(uint_fixed_16_16_t val,
- uint_fixed_16_16_t d)
+static inline u32 div_round_up_fixed16(uint_fixed_16_16_t val,
+ uint_fixed_16_16_t d)
{
return DIV_ROUND_UP(val.val, d.val);
}
-static inline uint32_t mul_round_up_u32_fixed16(uint32_t val,
- uint_fixed_16_16_t mul)
+static inline u32 mul_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t mul)
{
- uint64_t intermediate_val;
+ u64 intermediate_val;
- intermediate_val = (uint64_t) val * mul.val;
+ intermediate_val = (u64)val * mul.val;
intermediate_val = DIV_ROUND_UP_ULL(intermediate_val, 1 << 16);
WARN_ON(intermediate_val > U32_MAX);
- return (uint32_t) intermediate_val;
+ return (u32)intermediate_val;
}
static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,
uint_fixed_16_16_t mul)
{
- uint64_t intermediate_val;
+ u64 intermediate_val;
- intermediate_val = (uint64_t) val.val * mul.val;
+ intermediate_val = (u64)val.val * mul.val;
intermediate_val = intermediate_val >> 16;
return clamp_u64_to_fixed16(intermediate_val);
}
-static inline uint_fixed_16_16_t div_fixed16(uint32_t val, uint32_t d)
+static inline uint_fixed_16_16_t div_fixed16(u32 val, u32 d)
{
- uint64_t interm_val;
+ u64 interm_val;
- interm_val = (uint64_t)val << 16;
+ interm_val = (u64)val << 16;
interm_val = DIV_ROUND_UP_ULL(interm_val, d);
return clamp_u64_to_fixed16(interm_val);
}
-static inline uint32_t div_round_up_u32_fixed16(uint32_t val,
- uint_fixed_16_16_t d)
+static inline u32 div_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t d)
{
- uint64_t interm_val;
+ u64 interm_val;
- interm_val = (uint64_t)val << 16;
+ interm_val = (u64)val << 16;
interm_val = DIV_ROUND_UP_ULL(interm_val, d.val);
WARN_ON(interm_val > U32_MAX);
- return (uint32_t) interm_val;
+ return (u32)interm_val;
}
-static inline uint_fixed_16_16_t mul_u32_fixed16(uint32_t val,
- uint_fixed_16_16_t mul)
+static inline uint_fixed_16_16_t mul_u32_fixed16(u32 val, uint_fixed_16_16_t mul)
{
- uint64_t intermediate_val;
+ u64 intermediate_val;
- intermediate_val = (uint64_t) val * mul.val;
+ intermediate_val = (u64)val * mul.val;
return clamp_u64_to_fixed16(intermediate_val);
}
static inline uint_fixed_16_16_t add_fixed16(uint_fixed_16_16_t add1,
uint_fixed_16_16_t add2)
{
- uint64_t interm_sum;
+ u64 interm_sum;
- interm_sum = (uint64_t) add1.val + add2.val;
+ interm_sum = (u64)add1.val + add2.val;
return clamp_u64_to_fixed16(interm_sum);
}
static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1,
- uint32_t add2)
+ u32 add2)
{
- uint64_t interm_sum;
+ u64 interm_sum;
uint_fixed_16_16_t interm_add2 = u32_to_fixed16(add2);
- interm_sum = (uint64_t) add1.val + interm_add2.val;
+ interm_sum = (u64)add1.val + interm_add2.val;
return clamp_u64_to_fixed16(interm_sum);
}
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
2018-11-15 12:01 ` [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
@ 2018-11-15 12:01 ` Jani Nikula
2018-11-16 10:40 ` Joonas Lahtinen
2018-11-16 10:52 ` Chris Wilson
2018-11-15 12:01 ` [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero() Jani Nikula
` (6 subsequent siblings)
8 siblings, 2 replies; 18+ messages in thread
From: Jani Nikula @ 2018-11-15 12:01 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
No need to use a compound statement enclosed in parenthesis where a C99
compound literal will do. No functional changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_fixed.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
index 08316e50167a..927c59395569 100644
--- a/drivers/gpu/drm/i915/i915_fixed.h
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -7,11 +7,7 @@ typedef struct {
u32 val;
} uint_fixed_16_16_t;
-#define FP_16_16_MAX ({ \
- uint_fixed_16_16_t fp; \
- fp.val = UINT_MAX; \
- fp; \
-})
+#define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
{
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero()
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
2018-11-15 12:01 ` [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
2018-11-15 12:01 ` [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition Jani Nikula
@ 2018-11-15 12:01 ` Jani Nikula
2018-11-16 10:40 ` Joonas Lahtinen
2018-11-15 12:01 ` [PATCH 5/5] drm/i915/fixed: cosmetic cleanup Jani Nikula
` (5 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2018-11-15 12:01 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Simply return the condition. No functional changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_fixed.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
index 927c59395569..524f1c95c4e1 100644
--- a/drivers/gpu/drm/i915/i915_fixed.h
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -11,9 +11,7 @@ typedef struct {
static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
{
- if (val.val == 0)
- return true;
- return false;
+ return val.val == 0;
}
static inline uint_fixed_16_16_t u32_to_fixed16(u32 val)
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/5] drm/i915/fixed: cosmetic cleanup
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
` (2 preceding siblings ...)
2018-11-15 12:01 ` [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero() Jani Nikula
@ 2018-11-15 12:01 ` Jani Nikula
2018-11-16 10:56 ` Joonas Lahtinen
2018-11-15 12:57 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h Patchwork
` (4 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2018-11-15 12:01 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Clean up fixed point temp variable initialization, use the more
conventional tmp name for temp variables, add empty lines before
return. No functional changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_fixed.h | 77 +++++++++++++++++++++------------------
1 file changed, 41 insertions(+), 36 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
index 524f1c95c4e1..a7a3eacd255e 100644
--- a/drivers/gpu/drm/i915/i915_fixed.h
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -16,11 +16,10 @@ static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
static inline uint_fixed_16_16_t u32_to_fixed16(u32 val)
{
- uint_fixed_16_16_t fp;
+ uint_fixed_16_16_t fp = { .val = val << 16 };
WARN_ON(val > U16_MAX);
- fp.val = val << 16;
return fp;
}
@@ -37,26 +36,25 @@ static inline u32 fixed16_to_u32(uint_fixed_16_16_t fp)
static inline uint_fixed_16_16_t min_fixed16(uint_fixed_16_16_t min1,
uint_fixed_16_16_t min2)
{
- uint_fixed_16_16_t min;
+ uint_fixed_16_16_t min = { .val = min(min1.val, min2.val) };
- min.val = min(min1.val, min2.val);
return min;
}
static inline uint_fixed_16_16_t max_fixed16(uint_fixed_16_16_t max1,
uint_fixed_16_16_t max2)
{
- uint_fixed_16_16_t max;
+ uint_fixed_16_16_t max = { .val = max(max1.val, max2.val) };
- max.val = max(max1.val, max2.val);
return max;
}
static inline uint_fixed_16_16_t clamp_u64_to_fixed16(u64 val)
{
- uint_fixed_16_16_t fp;
+ uint_fixed_16_16_t fp = { .val = (u32)val };
+
WARN_ON(val > U32_MAX);
- fp.val = (u32)val;
+
return fp;
}
@@ -68,66 +66,73 @@ static inline u32 div_round_up_fixed16(uint_fixed_16_16_t val,
static inline u32 mul_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t mul)
{
- u64 intermediate_val;
+ u64 tmp;
+
+ tmp = (u64)val * mul.val;
+ tmp = DIV_ROUND_UP_ULL(tmp, 1 << 16);
+ WARN_ON(tmp > U32_MAX);
- intermediate_val = (u64)val * mul.val;
- intermediate_val = DIV_ROUND_UP_ULL(intermediate_val, 1 << 16);
- WARN_ON(intermediate_val > U32_MAX);
- return (u32)intermediate_val;
+ return (u32)tmp;
}
static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,
uint_fixed_16_16_t mul)
{
- u64 intermediate_val;
+ u64 tmp;
- intermediate_val = (u64)val.val * mul.val;
- intermediate_val = intermediate_val >> 16;
- return clamp_u64_to_fixed16(intermediate_val);
+ tmp = (u64)val.val * mul.val;
+ tmp = tmp >> 16;
+
+ return clamp_u64_to_fixed16(tmp);
}
static inline uint_fixed_16_16_t div_fixed16(u32 val, u32 d)
{
- u64 interm_val;
+ u64 tmp;
+
+ tmp = (u64)val << 16;
+ tmp = DIV_ROUND_UP_ULL(tmp, d);
- interm_val = (u64)val << 16;
- interm_val = DIV_ROUND_UP_ULL(interm_val, d);
- return clamp_u64_to_fixed16(interm_val);
+ return clamp_u64_to_fixed16(tmp);
}
static inline u32 div_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t d)
{
- u64 interm_val;
+ u64 tmp;
- interm_val = (u64)val << 16;
- interm_val = DIV_ROUND_UP_ULL(interm_val, d.val);
- WARN_ON(interm_val > U32_MAX);
- return (u32)interm_val;
+ tmp = (u64)val << 16;
+ tmp = DIV_ROUND_UP_ULL(tmp, d.val);
+ WARN_ON(tmp > U32_MAX);
+
+ return (u32)tmp;
}
static inline uint_fixed_16_16_t mul_u32_fixed16(u32 val, uint_fixed_16_16_t mul)
{
- u64 intermediate_val;
+ u64 tmp;
+
+ tmp = (u64)val * mul.val;
- intermediate_val = (u64)val * mul.val;
- return clamp_u64_to_fixed16(intermediate_val);
+ return clamp_u64_to_fixed16(tmp);
}
static inline uint_fixed_16_16_t add_fixed16(uint_fixed_16_16_t add1,
uint_fixed_16_16_t add2)
{
- u64 interm_sum;
+ u64 tmp;
- interm_sum = (u64)add1.val + add2.val;
- return clamp_u64_to_fixed16(interm_sum);
+ tmp = (u64)add1.val + add2.val;
+
+ return clamp_u64_to_fixed16(tmp);
}
static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1,
u32 add2)
{
- u64 interm_sum;
- uint_fixed_16_16_t interm_add2 = u32_to_fixed16(add2);
+ uint_fixed_16_16_t tmp_add2 = u32_to_fixed16(add2);
+ u64 tmp;
+
+ tmp = (u64)add1.val + tmp_add2.val;
- interm_sum = (u64)add1.val + interm_add2.val;
- return clamp_u64_to_fixed16(interm_sum);
+ return clamp_u64_to_fixed16(tmp);
}
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
` (3 preceding siblings ...)
2018-11-15 12:01 ` [PATCH 5/5] drm/i915/fixed: cosmetic cleanup Jani Nikula
@ 2018-11-15 12:57 ` Patchwork
2018-11-15 13:00 ` ✗ Fi.CI.SPARSE: " Patchwork
` (3 subsequent siblings)
8 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-11-15 12:57 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
URL : https://patchwork.freedesktop.org/series/52528/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
6a9582cd3a2e drm/i915: extract fixed point math to i915_fixed.h
-:169: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#169:
new file mode 100644
-:179: WARNING:NEW_TYPEDEFS: do not add new typedefs
#179: FILE: drivers/gpu/drm/i915/i915_fixed.h:6:
+typedef struct {
-:237: WARNING:LINE_SPACING: Missing a blank line after declarations
#237: FILE: drivers/gpu/drm/i915/i915_fixed.h:64:
+ uint_fixed_16_16_t fp;
+ WARN_ON(val > U32_MAX);
-:238: CHECK:SPACING: No space is necessary after a cast
#238: FILE: drivers/gpu/drm/i915/i915_fixed.h:65:
+ fp.val = (uint32_t) val;
-:253: CHECK:SPACING: No space is necessary after a cast
#253: FILE: drivers/gpu/drm/i915/i915_fixed.h:80:
+ intermediate_val = (uint64_t) val * mul.val;
-:256: CHECK:SPACING: No space is necessary after a cast
#256: FILE: drivers/gpu/drm/i915/i915_fixed.h:83:
+ return (uint32_t) intermediate_val;
-:264: CHECK:SPACING: No space is necessary after a cast
#264: FILE: drivers/gpu/drm/i915/i915_fixed.h:91:
+ intermediate_val = (uint64_t) val.val * mul.val;
-:286: CHECK:SPACING: No space is necessary after a cast
#286: FILE: drivers/gpu/drm/i915/i915_fixed.h:113:
+ return (uint32_t) interm_val;
-:294: CHECK:SPACING: No space is necessary after a cast
#294: FILE: drivers/gpu/drm/i915/i915_fixed.h:121:
+ intermediate_val = (uint64_t) val * mul.val;
-:303: CHECK:SPACING: No space is necessary after a cast
#303: FILE: drivers/gpu/drm/i915/i915_fixed.h:130:
+ interm_sum = (uint64_t) add1.val + add2.val;
-:313: CHECK:SPACING: No space is necessary after a cast
#313: FILE: drivers/gpu/drm/i915/i915_fixed.h:140:
+ interm_sum = (uint64_t) add1.val + interm_add2.val;
total: 0 errors, 3 warnings, 8 checks, 293 lines checked
972f5010d577 drm/i915/fixed: prefer kernel types over stdint types
23dc0f69fbfe drm/i915/fixed: simplify FP_16_16_MAX definition
f26dbee44029 drm/i915/fixed: simplify is_fixed16_zero()
7abd76bd22f0 drm/i915/fixed: cosmetic cleanup
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✗ Fi.CI.SPARSE: warning for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
` (4 preceding siblings ...)
2018-11-15 12:57 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h Patchwork
@ 2018-11-15 13:00 ` Patchwork
2018-11-15 13:14 ` ✓ Fi.CI.BAT: success " Patchwork
` (2 subsequent siblings)
8 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-11-15 13:00 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
URL : https://patchwork.freedesktop.org/series/52528/
State : warning
== Summary ==
$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: extract fixed point math to i915_fixed.h
-O:drivers/gpu/drm/i915/i915_drv.h:172:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:172:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:172:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:172:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_drv.h:181:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:48:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:48:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:48:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:48:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:57:19: warning: expression using sizeof(void)
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3716:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3579:16: warning: expression using sizeof(void)
Commit: drm/i915/fixed: prefer kernel types over stdint types
Okay!
Commit: drm/i915/fixed: simplify FP_16_16_MAX definition
Okay!
Commit: drm/i915/fixed: simplify is_fixed16_zero()
Okay!
Commit: drm/i915/fixed: cosmetic cleanup
-O:drivers/gpu/drm/i915/i915_fixed.h:42:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:42:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:42:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:42:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_fixed.h:51:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:39:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:39:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:39:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:39:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_fixed.h:47:43: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
` (5 preceding siblings ...)
2018-11-15 13:00 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-11-15 13:14 ` Patchwork
2018-11-15 15:55 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-16 10:36 ` [PATCH 1/5] " Joonas Lahtinen
8 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-11-15 13:14 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
URL : https://patchwork.freedesktop.org/series/52528/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_5142 -> Patchwork_10829 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/52528/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10829 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_contexts:
fi-icl-u: NOTRUN -> INCOMPLETE (fdo#108315)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
fi-byt-clapper: PASS -> FAIL (fdo#103191, fdo#107362)
igt@kms_pipe_crc_basic@read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
igt@drv_selftest@live_hangcheck:
fi-skl-guc: DMESG-FAIL (fdo#108744, fdo#108593) -> PASS
fi-bwr-2160: DMESG-FAIL (fdo#108735) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-WARN (fdo#102614) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
fdo#108593 https://bugs.freedesktop.org/show_bug.cgi?id=108593
fdo#108735 https://bugs.freedesktop.org/show_bug.cgi?id=108735
fdo#108744 https://bugs.freedesktop.org/show_bug.cgi?id=108744
== Participating hosts (48 -> 46) ==
Additional (4): fi-byt-j1900 fi-glk-j4005 fi-icl-u fi-pnv-d510
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-cfl-s3
== Build changes ==
* Linux: CI_DRM_5142 -> Patchwork_10829
CI_DRM_5142: 529058ece9a1c2cf9428deff766a4e236580d8b0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4715: 111593c49d812a4f4ff9ab0ef053a3ab88a6f73f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10829: 7abd76bd22f01fbdaa6d09e1edddaff5a9f791fb @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
7abd76bd22f0 drm/i915/fixed: cosmetic cleanup
f26dbee44029 drm/i915/fixed: simplify is_fixed16_zero()
23dc0f69fbfe drm/i915/fixed: simplify FP_16_16_MAX definition
972f5010d577 drm/i915/fixed: prefer kernel types over stdint types
6a9582cd3a2e drm/i915: extract fixed point math to i915_fixed.h
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10829/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
` (6 preceding siblings ...)
2018-11-15 13:14 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-11-15 15:55 ` Patchwork
2018-11-16 10:36 ` [PATCH 1/5] " Joonas Lahtinen
8 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-11-15 15:55 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h
URL : https://patchwork.freedesktop.org/series/52528/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_5142_full -> Patchwork_10829_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10829_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@shrink:
shard-skl: NOTRUN -> INCOMPLETE (fdo#106886)
igt@gem_cpu_reloc@full:
shard-skl: NOTRUN -> INCOMPLETE (fdo#108073)
igt@gem_exec_suspend@basic-s3:
shard-skl: PASS -> INCOMPLETE (fdo#107773, fdo#104108)
igt@gem_userptr_blits@readonly-unsync:
shard-skl: PASS -> INCOMPLETE (fdo#108074)
igt@kms_color@pipe-b-legacy-gamma:
shard-apl: PASS -> FAIL (fdo#104782)
igt@kms_cursor_crc@cursor-64x21-sliding:
shard-apl: PASS -> FAIL (fdo#103232) +3
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: PASS -> DMESG-WARN (fdo#106538, fdo#105763)
igt@kms_draw_crc@draw-method-rgb565-pwrite-untiled:
shard-skl: PASS -> FAIL (fdo#103184)
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#105363, fdo#102887)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
shard-glk: PASS -> FAIL (fdo#103167) +1
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary:
shard-skl: PASS -> FAIL (fdo#103167)
igt@kms_plane@plane-position-covered-pipe-c-planes:
shard-apl: PASS -> FAIL (fdo#103166) +2
igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
shard-skl: PASS -> FAIL (fdo#107815, fdo#108145)
igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
shard-skl: NOTRUN -> FAIL (fdo#107815, fdo#108145)
igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
shard-skl: NOTRUN -> FAIL (fdo#108145) +1
igt@kms_universal_plane@universal-plane-pipe-c-functional:
shard-glk: PASS -> FAIL (fdo#103166) +1
==== Possible fixes ====
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#106887, fdo#103665, fdo#106023) -> PASS
igt@kms_color@pipe-b-degamma:
shard-apl: FAIL (fdo#104782) -> PASS
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-kbl: DMESG-WARN (fdo#108566) -> PASS
igt@kms_cursor_crc@cursor-64x64-dpms:
shard-apl: FAIL (fdo#103232) -> PASS +2
igt@kms_flip@flip-vs-expired-vblank:
shard-skl: FAIL (fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
shard-apl: FAIL (fdo#103167) -> PASS +1
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
shard-glk: FAIL (fdo#103167) -> PASS +2
igt@kms_plane@pixel-format-pipe-c-planes:
shard-apl: FAIL (fdo#103166) -> PASS +1
igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> PASS
igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
shard-skl: FAIL (fdo#107815) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
igt@kms_vblank@pipe-b-ts-continuation-suspend:
shard-hsw: FAIL (fdo#104894) -> PASS
igt@perf@polling:
shard-hsw: FAIL (fdo#102252) -> PASS
igt@pm_rpm@modeset-lpsp-stress:
shard-skl: INCOMPLETE (fdo#107807) -> PASS
igt@pm_rpm@system-suspend-modeset:
shard-skl: INCOMPLETE (fdo#107807, fdo#104108) -> PASS
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#104894 https://bugs.freedesktop.org/show_bug.cgi?id=104894
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106887 https://bugs.freedesktop.org/show_bug.cgi?id=106887
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
fdo#108073 https://bugs.freedesktop.org/show_bug.cgi?id=108073
fdo#108074 https://bugs.freedesktop.org/show_bug.cgi?id=108074
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108566 https://bugs.freedesktop.org/show_bug.cgi?id=108566
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (7 -> 6) ==
Missing (1): shard-iclb
== Build changes ==
* Linux: CI_DRM_5142 -> Patchwork_10829
CI_DRM_5142: 529058ece9a1c2cf9428deff766a4e236580d8b0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4715: 111593c49d812a4f4ff9ab0ef053a3ab88a6f73f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10829: 7abd76bd22f01fbdaa6d09e1edddaff5a9f791fb @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10829/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
` (7 preceding siblings ...)
2018-11-15 15:55 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-11-16 10:36 ` Joonas Lahtinen
2018-11-16 10:52 ` Jani Nikula
8 siblings, 1 reply; 18+ messages in thread
From: Joonas Lahtinen @ 2018-11-16 10:36 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Quoting Jani Nikula (2018-11-15 14:01:22)
> Reduce bloat in one of the bigger header files. Fix some indentation
> while at it. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Do add include guards. Then this is:
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types
2018-11-15 12:01 ` [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
@ 2018-11-16 10:38 ` Joonas Lahtinen
0 siblings, 0 replies; 18+ messages in thread
From: Joonas Lahtinen @ 2018-11-16 10:38 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Quoting Jani Nikula (2018-11-15 14:01:23)
> While at it, conform to kernel spacing (i.e. no space) after cast. No
> functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
2018-11-15 12:01 ` [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition Jani Nikula
@ 2018-11-16 10:40 ` Joonas Lahtinen
2018-11-16 10:54 ` Jani Nikula
2018-11-16 10:52 ` Chris Wilson
1 sibling, 1 reply; 18+ messages in thread
From: Joonas Lahtinen @ 2018-11-16 10:40 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Quoting Jani Nikula (2018-11-15 14:01:24)
> No need to use a compound statement enclosed in parenthesis where a C99
> compound literal will do. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Out of curiosity, did this have an effect on asm generation?
Presumably not.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero()
2018-11-15 12:01 ` [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero() Jani Nikula
@ 2018-11-16 10:40 ` Joonas Lahtinen
0 siblings, 0 replies; 18+ messages in thread
From: Joonas Lahtinen @ 2018-11-16 10:40 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Quoting Jani Nikula (2018-11-15 14:01:25)
> Simply return the condition. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h
2018-11-16 10:36 ` [PATCH 1/5] " Joonas Lahtinen
@ 2018-11-16 10:52 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-11-16 10:52 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
On Fri, 16 Nov 2018, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> Quoting Jani Nikula (2018-11-15 14:01:22)
>> Reduce bloat in one of the bigger header files. Fix some indentation
>> while at it. No functional changes.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Do add include guards. Then this is:
D'oh!
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Thanks for the review.
BR,
Jani.
>
> Regards, Joonas
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
2018-11-15 12:01 ` [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition Jani Nikula
2018-11-16 10:40 ` Joonas Lahtinen
@ 2018-11-16 10:52 ` Chris Wilson
2018-11-20 11:12 ` Jani Nikula
1 sibling, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2018-11-16 10:52 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Quoting Jani Nikula (2018-11-15 12:01:24)
> No need to use a compound statement enclosed in parenthesis where a C99
> compound literal will do. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/i915_fixed.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
> index 08316e50167a..927c59395569 100644
> --- a/drivers/gpu/drm/i915/i915_fixed.h
> +++ b/drivers/gpu/drm/i915/i915_fixed.h
> @@ -7,11 +7,7 @@ typedef struct {
> u32 val;
> } uint_fixed_16_16_t;
>
> -#define FP_16_16_MAX ({ \
> - uint_fixed_16_16_t fp; \
> - fp.val = UINT_MAX; \
> - fp; \
> -})
> +#define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
Following the standard set by pgprot_t
#define u16_16(x) ((u16_16_t){ .val = (x) })
#define U16_16_MAX u16_16(U32_MAX)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
2018-11-16 10:40 ` Joonas Lahtinen
@ 2018-11-16 10:54 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-11-16 10:54 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
On Fri, 16 Nov 2018, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> Quoting Jani Nikula (2018-11-15 14:01:24)
>> No need to use a compound statement enclosed in parenthesis where a C99
>> compound literal will do. No functional changes.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Out of curiosity, did this have an effect on asm generation?
> Presumably not.
For some reason it caused tons of label etc. changes so it was hard to
check, but I didn't spot any functional asm changes.
BR,
Jani.
>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>
> Regards, Joonas
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 5/5] drm/i915/fixed: cosmetic cleanup
2018-11-15 12:01 ` [PATCH 5/5] drm/i915/fixed: cosmetic cleanup Jani Nikula
@ 2018-11-16 10:56 ` Joonas Lahtinen
0 siblings, 0 replies; 18+ messages in thread
From: Joonas Lahtinen @ 2018-11-16 10:56 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Quoting Jani Nikula (2018-11-15 14:01:26)
> Clean up fixed point temp variable initialization, use the more
> conventional tmp name for temp variables, add empty lines before
> return. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
<SNIP>
> static inline uint_fixed_16_16_t clamp_u64_to_fixed16(u64 val)
> {
> - uint_fixed_16_16_t fp;
> + uint_fixed_16_16_t fp = { .val = (u32)val };
Also a possibility:
.val = lower_32_bits(val)
WARN_ON(upper_32_bits(val))
But your style might be more uniform across other funcs.
> +
> WARN_ON(val > U32_MAX);
> - fp.val = (u32)val;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
2018-11-16 10:52 ` Chris Wilson
@ 2018-11-20 11:12 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-11-20 11:12 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Fri, 16 Nov 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-11-15 12:01:24)
>> No need to use a compound statement enclosed in parenthesis where a C99
>> compound literal will do. No functional changes.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_fixed.h | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
>> index 08316e50167a..927c59395569 100644
>> --- a/drivers/gpu/drm/i915/i915_fixed.h
>> +++ b/drivers/gpu/drm/i915/i915_fixed.h
>> @@ -7,11 +7,7 @@ typedef struct {
>> u32 val;
>> } uint_fixed_16_16_t;
>>
>> -#define FP_16_16_MAX ({ \
>> - uint_fixed_16_16_t fp; \
>> - fp.val = UINT_MAX; \
>> - fp; \
>> -})
>> +#define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
>
> Following the standard set by pgprot_t
>
> #define u16_16(x) ((u16_16_t){ .val = (x) })
> #define U16_16_MAX u16_16(U32_MAX)
I left that for follow-up, and pushed v2 of the series.
I think the uint_fixed_16_16_t type name is a bit unwieldy, should we
rename that while at it...
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2018-11-20 11:12 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
2018-11-15 12:01 ` [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
2018-11-16 10:38 ` Joonas Lahtinen
2018-11-15 12:01 ` [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition Jani Nikula
2018-11-16 10:40 ` Joonas Lahtinen
2018-11-16 10:54 ` Jani Nikula
2018-11-16 10:52 ` Chris Wilson
2018-11-20 11:12 ` Jani Nikula
2018-11-15 12:01 ` [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero() Jani Nikula
2018-11-16 10:40 ` Joonas Lahtinen
2018-11-15 12:01 ` [PATCH 5/5] drm/i915/fixed: cosmetic cleanup Jani Nikula
2018-11-16 10:56 ` Joonas Lahtinen
2018-11-15 12:57 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h Patchwork
2018-11-15 13:00 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-15 13:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-15 15:55 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-16 10:36 ` [PATCH 1/5] " Joonas Lahtinen
2018-11-16 10:52 ` Jani Nikula
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.