Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a240d4d authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/i915: fixup sparse warnings



- __iomem where there is none (I love how we mix these things up).
- Use gfp_t instead of an other plain type.
- Unconfuse one place about enum pipe vs enum transcoder - for the pch
  transcoder we actually use the pipe enum. Fixup the other cases
  where we assign the pipe to the cpu transcoder with explicit casts.
- Declare the mch_lock properly in a header.

There is still a decent mess in intel_bios.c about __iomem, but heck,
this is x86 and we're allowed to do that.

Makes-sparse-happy: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Use a space after the cast consistently and fix up the
newly-added cast in i915_irq.c to properly use __iomem.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent c1f093e0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -546,11 +546,11 @@ static int i915_hws_info(struct seq_file *m, void *data)
	struct drm_device *dev = node->minor->dev;
	drm_i915_private_t *dev_priv = dev->dev_private;
	struct intel_ring_buffer *ring;
	const volatile u32 __iomem *hws;
	const u32 *hws;
	int i;

	ring = &dev_priv->ring[(uintptr_t)node->info_ent->data];
	hws = (volatile u32 __iomem *)ring->status_page.page_addr;
	hws = ring->status_page.page_addr;
	if (hws == NULL)
		return 0;

+3 −0
Original line number Diff line number Diff line
@@ -577,6 +577,9 @@ struct intel_gen6_power_mgmt {
	struct mutex hw_lock;
};

/* defined intel_pm.c */
extern spinlock_t mchdev_lock;

struct intel_ilk_power_mgmt {
	u8 cur_delay;
	u8 min_delay;
+1 −1
Original line number Diff line number Diff line
@@ -3705,7 +3705,7 @@ struct drm_i915_gem_object *i915_gem_alloc_object(struct drm_device *dev,
{
	struct drm_i915_gem_object *obj;
	struct address_space *mapping;
	u32 mask;
	gfp_t mask;

	obj = i915_gem_object_alloc(dev);
	if (obj == NULL)
+1 −4
Original line number Diff line number Diff line
@@ -300,9 +300,6 @@ static void i915_hotplug_work_func(struct work_struct *work)
	drm_helper_hpd_irq_event(dev);
}

/* defined intel_pm.c */
extern spinlock_t mchdev_lock;

static void ironlake_handle_rps_change(struct drm_device *dev)
{
	drm_i915_private_t *dev_priv = dev->dev_private;
@@ -936,7 +933,7 @@ i915_error_object_create(struct drm_i915_private *dev_priv,
			offset += src->stolen->start;
			offset += i << PAGE_SHIFT;

			memcpy_fromio(d, (void *)offset, PAGE_SIZE);
			memcpy_fromio(d, (void __iomem *) offset, PAGE_SIZE);
		} else {
			struct page *page;
			void *s;
+1 −1
Original line number Diff line number Diff line
@@ -1044,7 +1044,7 @@ bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector)
	if (port == PORT_A)
		cpu_transcoder = TRANSCODER_EDP;
	else
		cpu_transcoder = pipe;
		cpu_transcoder = (enum transcoder) pipe;

	tmp = I915_READ(TRANS_DDI_FUNC_CTL(cpu_transcoder));

Loading