drm/i915/tgl: Fix TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT() macro
Subsystems (3)
PATCH 1/1 drm/i915/tgl: Fix TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT() macro
This macro doesn't work because the right shift has higher precedence than bitwise AND.
--- drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +1 -1
@@ -9433,7 +9433,7 @@ enum skl_power_gate {#define TRANS_DDI_SELECT_PORT (x) ((x) << TRANS_DDI_PORT_SHIFT)#define TGL_TRANS_DDI_SELECT_PORT (x) (((x) + 1) << TGL_TRANS_DDI_PORT_SHIFT)#define TRANS_DDI_FUNC_CTL_VAL_TO_PORT (val) (((val) & TRANS_DDI_PORT_MASK) >> TRANS_DDI_PORT_SHIFT) -#define TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT (val) (((val) & TGL_TRANS_DDI_PORT_MASK >> TGL_TRANS_DDI_PORT_SHIFT) - 1) +#define TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT (val) ((((val) & TGL_TRANS_DDI_PORT_MASK) >> TGL_TRANS_DDI_PORT_SHIFT) - 1)#define TRANS_DDI_MODE_SELECT_MASK (7 << 24)#define TRANS_DDI_MODE_SELECT_HDMI (0 << 24)#define TRANS_DDI_MODE_SELECT_DVI (1 << 24)
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/tgl: Fix TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT() macro
== Series Details ==
== Series Details ==
Series: drm/i915/tgl: Fix TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT() macro
URL : https://patchwork.freedesktop.org/series/65227/
State : failure
== Summary ==
Applying: drm/i915/tgl: Fix TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT() macro Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_reg.h
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/i915_reg.h
No changes -- Patch already applied.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 5 lines · Dan Carpenter
This macro doesn't work because the right shift has higher precedence than bitwise AND.
Fixes 9749a5b6c09f ("drm/i915/tgl: Fix the read of the DDI that transcoder is attached to")Signed-off-by Dan Carpenter <[email protected]>
Thanks, already fixed by 1cdd8705c7ac ("drm/i915/tgl: Fix missing parentheses on TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT").
BR,
Jani.
Quoted 17 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -9433,7 +9433,7 @@ enum skl_power_gate {#define TRANS_DDI_SELECT_PORT (x) ((x) << TRANS_DDI_PORT_SHIFT)#define TGL_TRANS_DDI_SELECT_PORT (x) (((x) + 1) << TGL_TRANS_DDI_PORT_SHIFT)#define TRANS_DDI_FUNC_CTL_VAL_TO_PORT (val) (((val) & TRANS_DDI_PORT_MASK) >> TRANS_DDI_PORT_SHIFT) -#define TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT (val) (((val) & TGL_TRANS_DDI_PORT_MASK >> TGL_TRANS_DDI_PORT_SHIFT) - 1) +#define TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT (val) ((((val) & TGL_TRANS_DDI_PORT_MASK) >> TGL_TRANS_DDI_PORT_SHIFT) - 1)#define TRANS_DDI_MODE_SELECT_MASK (7 << 24)#define TRANS_DDI_MODE_SELECT_HDMI (0 << 24)#define TRANS_DDI_MODE_SELECT_DVI (1 << 24)
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx