forked from Minki/linux
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: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
c1f093e09c
commit
1a240d4de2
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
||||
|
@ -1671,7 +1671,7 @@ static void lpt_enable_pch_transcoder(struct drm_i915_private *dev_priv,
|
||||
BUG_ON(dev_priv->info->gen < 5);
|
||||
|
||||
/* FDI must be feeding us bits for PCH ports */
|
||||
assert_fdi_tx_enabled(dev_priv, cpu_transcoder);
|
||||
assert_fdi_tx_enabled(dev_priv, (enum pipe) cpu_transcoder);
|
||||
assert_fdi_rx_enabled(dev_priv, TRANSCODER_A);
|
||||
|
||||
/* Workaround: set timing override bit. */
|
||||
@ -1759,7 +1759,7 @@ static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
|
||||
{
|
||||
enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv,
|
||||
pipe);
|
||||
enum transcoder pch_transcoder;
|
||||
enum pipe pch_transcoder;
|
||||
int reg;
|
||||
u32 val;
|
||||
|
||||
@ -1779,7 +1779,8 @@ static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
|
||||
if (pch_port) {
|
||||
/* if driving the PCH, we need FDI enabled */
|
||||
assert_fdi_rx_pll_enabled(dev_priv, pch_transcoder);
|
||||
assert_fdi_tx_pll_enabled(dev_priv, cpu_transcoder);
|
||||
assert_fdi_tx_pll_enabled(dev_priv,
|
||||
(enum pipe) cpu_transcoder);
|
||||
}
|
||||
/* FIXME: assert CPU port conditions for SNB+ */
|
||||
}
|
||||
@ -3598,7 +3599,7 @@ static void haswell_crtc_off(struct drm_crtc *crtc)
|
||||
|
||||
/* Stop saying we're using TRANSCODER_EDP because some other CRTC might
|
||||
* start using it. */
|
||||
intel_crtc->cpu_transcoder = intel_crtc->pipe;
|
||||
intel_crtc->cpu_transcoder = (enum transcoder) intel_crtc->pipe;
|
||||
|
||||
intel_ddi_put_crtc_pll(crtc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user