drm/i915: Remove I915_WRITE_NOTRACE
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 11 Jun 2019 10:45:46 +0000 (11:45 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 12 Jun 2019 14:33:13 +0000 (15:33 +0100)
Only a few call sites remain which have been converted to uncore mmio
accessors and so the macro can be removed.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-4-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_gmbus.c

index caea128d1052ddf7fda4e15b1cceffe38ef559c1..f475b10eb635c054bb93b8db5d519a5edecb94bf 100644 (file)
@@ -2844,7 +2844,6 @@ extern void intel_display_print_error_state(struct drm_i915_error_state_buf *e,
 #define I915_READ(reg__)        __I915_REG_OP(read, dev_priv, (reg__))
 #define I915_WRITE(reg__, val__) __I915_REG_OP(write, dev_priv, (reg__), (val__))
 #define I915_READ_NOTRACE(reg__)        __I915_REG_OP(read_notrace, dev_priv, (reg__))
-#define I915_WRITE_NOTRACE(reg__, val__) __I915_REG_OP(write_notrace, dev_priv, (reg__), (val__))
 
 #define POSTING_READ(reg__)    __I915_REG_OP(posting_read, dev_priv, (reg__))
 
index 969ce8b71e32cd05b088e896a26ab1f84632da22..5e4c543e82e8e518d3c7f6625de8aa2a5334b92e 100644 (file)
@@ -201,27 +201,37 @@ static u32 get_reserved(struct intel_gmbus *bus)
 static int get_clock(void *data)
 {
        struct intel_gmbus *bus = data;
-       struct drm_i915_private *dev_priv = bus->dev_priv;
+       struct intel_uncore *uncore = &bus->dev_priv->uncore;
        u32 reserved = get_reserved(bus);
-       I915_WRITE_NOTRACE(bus->gpio_reg, reserved | GPIO_CLOCK_DIR_MASK);
-       I915_WRITE_NOTRACE(bus->gpio_reg, reserved);
-       return (I915_READ_NOTRACE(bus->gpio_reg) & GPIO_CLOCK_VAL_IN) != 0;
+
+       intel_uncore_write_notrace(uncore,
+                                  bus->gpio_reg,
+                                  reserved | GPIO_CLOCK_DIR_MASK);
+       intel_uncore_write_notrace(uncore, bus->gpio_reg, reserved);
+
+       return (intel_uncore_read_notrace(uncore, bus->gpio_reg) &
+               GPIO_CLOCK_VAL_IN) != 0;
 }
 
 static int get_data(void *data)
 {
        struct intel_gmbus *bus = data;
-       struct drm_i915_private *dev_priv = bus->dev_priv;
+       struct intel_uncore *uncore = &bus->dev_priv->uncore;
        u32 reserved = get_reserved(bus);
-       I915_WRITE_NOTRACE(bus->gpio_reg, reserved | GPIO_DATA_DIR_MASK);
-       I915_WRITE_NOTRACE(bus->gpio_reg, reserved);
-       return (I915_READ_NOTRACE(bus->gpio_reg) & GPIO_DATA_VAL_IN) != 0;
+
+       intel_uncore_write_notrace(uncore,
+                                  bus->gpio_reg,
+                                  reserved | GPIO_DATA_DIR_MASK);
+       intel_uncore_write_notrace(uncore, bus->gpio_reg, reserved);
+
+       return (intel_uncore_read_notrace(uncore, bus->gpio_reg) &
+               GPIO_DATA_VAL_IN) != 0;
 }
 
 static void set_clock(void *data, int state_high)
 {
        struct intel_gmbus *bus = data;
-       struct drm_i915_private *dev_priv = bus->dev_priv;
+       struct intel_uncore *uncore = &bus->dev_priv->uncore;
        u32 reserved = get_reserved(bus);
        u32 clock_bits;
 
@@ -229,16 +239,18 @@ static void set_clock(void *data, int state_high)
                clock_bits = GPIO_CLOCK_DIR_IN | GPIO_CLOCK_DIR_MASK;
        else
                clock_bits = GPIO_CLOCK_DIR_OUT | GPIO_CLOCK_DIR_MASK |
-                       GPIO_CLOCK_VAL_MASK;
+                            GPIO_CLOCK_VAL_MASK;
 
-       I915_WRITE_NOTRACE(bus->gpio_reg, reserved | clock_bits);
-       POSTING_READ(bus->gpio_reg);
+       intel_uncore_write_notrace(uncore,
+                                  bus->gpio_reg,
+                                  reserved | clock_bits);
+       intel_uncore_posting_read(uncore, bus->gpio_reg);
 }
 
 static void set_data(void *data, int state_high)
 {
        struct intel_gmbus *bus = data;
-       struct drm_i915_private *dev_priv = bus->dev_priv;
+       struct intel_uncore *uncore = &bus->dev_priv->uncore;
        u32 reserved = get_reserved(bus);
        u32 data_bits;
 
@@ -248,8 +260,8 @@ static void set_data(void *data, int state_high)
                data_bits = GPIO_DATA_DIR_OUT | GPIO_DATA_DIR_MASK |
                        GPIO_DATA_VAL_MASK;
 
-       I915_WRITE_NOTRACE(bus->gpio_reg, reserved | data_bits);
-       POSTING_READ(bus->gpio_reg);
+       intel_uncore_write_notrace(uncore, bus->gpio_reg, reserved | data_bits);
+       intel_uncore_posting_read(uncore, bus->gpio_reg);
 }
 
 static int