Re: [RFC PATCH 07/12] drm/i915/dsi: switch to drm_panel interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 23, 2015 at 04:27:46PM +0530, Shobhit Kumar wrote:
> On 01/16/2015 05:57 PM, Jani Nikula wrote:
> >@@ -881,13 +889,23 @@ void intel_dsi_init(struct drm_device *dev)
> >
> >  	drm_connector_register(connector);
> >
> >-	fixed_mode = dsi->dev_ops->get_modes(&intel_dsi->dev);
> >+	drm_panel_attach(intel_dsi->panel, connector);
> >+	drm_panel_get_modes(intel_dsi->panel);
> 
> Should be inside the config mutex_lock below.

Why?

> >+
> >+	mutex_lock(&dev->mode_config.mutex);
> >+	list_for_each_entry(scan, &connector->probed_modes, head) {
> >+		if ((scan->type & DRM_MODE_TYPE_PREFERRED)) {
> >+			fixed_mode = drm_mode_duplicate(dev, scan);
> >+			break;
> >+		}
> >+	}
> >+	mutex_unlock(&dev->mode_config.mutex);

Generally this is single-threaded init code, no one else can touch it.
Which means you also never ever need locks. We tend to occasionally
sprinkle them around to satisfy general locking checks which are correct
at runtime. But at least in tricky cases that means we also stick a
comment next to them (see e.g. the various places in i915_irq.c).

Merged up to the previous patch, thanks a lot.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux