diff options
author | Jani Nikula <jani.nikula@intel.com> | 2020-01-21 12:39:15 +0100 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2020-01-23 10:07:00 +0100 |
commit | 9c757aeaaaa18d36eba5a464109690e8f7990a40 (patch) | |
tree | 1c7c757933bd6a692d25b8607ce561c2e087bab5 /drivers/gpu/drm/i915/i915_drv.h | |
parent | drm/i915: Cleanup properly if the implicit fence setup fails (diff) | |
download | linux-9c757aeaaaa18d36eba5a464109690e8f7990a40.tar.xz linux-9c757aeaaaa18d36eba5a464109690e8f7990a40.zip |
drm/i915: add display engine uncore helpers
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@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200121113915.9813-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 50abf9113b2f..a8a08c63278e 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2008,20 +2008,6 @@ int i915_reg_read_ioctl(struct drm_device *dev, void *data, #define I915_READ_FW(reg__) __I915_REG_OP(read_fw, dev_priv, (reg__)) #define I915_WRITE_FW(reg__, val__) __I915_REG_OP(write_fw, dev_priv, (reg__), (val__)) -/* register wait wrappers for display regs */ -#define intel_de_wait_for_register(dev_priv_, reg_, mask_, value_, timeout_) \ - intel_wait_for_register(&(dev_priv_)->uncore, \ - (reg_), (mask_), (value_), (timeout_)) - -#define intel_de_wait_for_set(dev_priv_, reg_, mask_, timeout_) ({ \ - u32 mask__ = (mask_); \ - intel_de_wait_for_register((dev_priv_), (reg_), \ - mask__, mask__, (timeout_)); \ -}) - -#define intel_de_wait_for_clear(dev_priv_, reg_, mask_, timeout_) \ - intel_de_wait_for_register((dev_priv_), (reg_), (mask_), 0, (timeout_)) - /* i915_mm.c */ int remap_io_mapping(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, |