On Tue, 10 Dec 2019, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> wrote: > Quoting Jani Nikula (2019-12-02 18:00:52) >> Add convenience helpers for the most common uncore operations with >> struct drm_i915_private * as context rather than struct intel_uncore *. >> >> The goal is to replace all instances of I915_READ(), >> I915_POSTING_READ(), I915_WRITE(), I915_READ_FW(), and I915_WRITE_FW() >> in display/ with these, to finally be able to get rid of the implicit >> dev_priv local parameter use. >> >> The idea is that any non-u32 reads or writes are special enough that >> they can use the intel_uncore_* functions directly. >> >> v2: >> - rename the file intel_de.h >> - move intel_de_wait_for_* there too >> - also add de fw helpers >> >> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> >> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> >> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> >> Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> >> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> >> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> >> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> >> --- >> drivers/gpu/drm/i915/display/intel_de.h | 72 +++++++++++++++++++ >> .../drm/i915/display/intel_display_types.h | 1 + >> drivers/gpu/drm/i915/i915_drv.h | 14 ---- >> 3 files changed, 73 insertions(+), 14 deletions(-) >> create mode 100644 drivers/gpu/drm/i915/display/intel_de.h >> >> diff --git a/drivers/gpu/drm/i915/display/intel_de.h b/drivers/gpu/drm/i915/display/intel_de.h >> new file mode 100644 >> index 000000000000..00da10bf35f5 >> --- /dev/null >> +++ b/drivers/gpu/drm/i915/display/intel_de.h >> @@ -0,0 +1,72 @@ >> +/* SPDX-License-Identifier: MIT */ >> +/* >> + * Copyright © 2019 Intel Corporation >> + */ >> + >> +#ifndef __INTEL_DE_H__ >> +#define __INTEL_DE_H__ >> + >> +#include "i915_drv.h" >> +#include "i915_reg.h" >> +#include "intel_uncore.h" >> + >> +static inline u32 >> +intel_de_read(struct drm_i915_private *i915, i915_reg_t reg) > > Is the plan to have struct intel_de inside i915 and then have that as > the prime parameter going forward? No. The plan is to keep i915 as the prime parameter for display. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx