[Intel-xe] [PATCH 6/6] drm/xe: Fixup __intel_de_wait_for_register macro.

Lucas De Marchi lucas.demarchi at intel.com
Tue Apr 4 18:05:14 UTC 2023


On Fri, Mar 31, 2023 at 12:24:19PM +0200, Maarten Lankhorst wrote:
>Create a dummy when output reg is null, this is required for the changes
>to MTL display support.

drm/xe/display here too. Or if you prefer to handle this as a fixup
commit to be squashed in next rebase, commit this is --fixup=<commit>

>
>Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>---
> drivers/gpu/drm/xe/display/xe_de.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/display/xe_de.h b/drivers/gpu/drm/xe/display/xe_de.h
>index 9f92fdb4159a..ce42e2938a06 100644
>--- a/drivers/gpu/drm/xe/display/xe_de.h
>+++ b/drivers/gpu/drm/xe/display/xe_de.h
>@@ -70,6 +70,10 @@ __intel_de_wait_for_register(struct drm_i915_private *i915, i915_reg_t reg,
> 			     unsigned int fast_timeout_us,
> 			     unsigned int slow_timeout_ms, u32 *out_value)
> {
>+	u32 dummy;

missing new line.


More commonly these kind of situations are handled the other way around
though:

	u32 x;

	ret = wait_for_atomic(((x = ...

	if (out_value)
		*out_value = x;

	return ret;

I don't mind either way though, up to you.

Note that in xe we got rid of wait_for() and friends though.
Do we want to drop this one too?

Lucas De Marchi

>+	if (!out_value)
>+		out_value = &dummy;
>+
> 	return wait_for_atomic(((*out_value = xe_mmio_read32(to_gt(i915), reg.reg)) & mask) == value,
> 			slow_timeout_ms);
> }
>-- 
>2.34.1
>


More information about the Intel-xe mailing list