<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/drm_sysfs.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-10-27T00:51:53Z</updated>
<entry>
<title>drm: Fix locking for sysfs dpms file</title>
<updated>2015-10-27T00:51:53Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2015-09-29T07:56:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d96105a5fefafefc110e964a75889e2dda8a8434'/>
<id>urn:sha1:d96105a5fefafefc110e964a75889e2dda8a8434</id>
<content type='text'>
commit 621bd0f6982badd6483acb191eb7b6226a578328 upstream.

With atomic drivers we need to make sure that (at least in general)
property reads hold the right locks. But the legacy dpms property is
special and can be read locklessly. Since userspace loves to just
randomly look at that all the time (like with "status") do that.

To make it clear that we play tricks use the READ_ONCE compiler
barrier (and also for paranoia).

Note that there's not really anything bad going on since even with the
new atomic paths we eventually end up not chasing any pointers (and
hence possibly freed memory and other fun stuff). The locking WARNING
has been added in

commit 88a48e297b3a3bac6022c03babfb038f1a886cea
Author: Rob Clark &lt;robdclark@gmail.com&gt;
Date:   Thu Dec 18 16:01:50 2014 -0500

    drm: add atomic properties

but since drivers are converting not everyone will have seen this from
the start.

Jens reported this and submitted a patch to just grab the
mode_config.connection_mutex, but we can do a bit better.

v2: Remove unused variables I failed to git add for real.

Reference: http://mid.gmane.org/20150928194822.GA3930@kernel.dk
Reported-by: Jens Axboe &lt;axboe@fb.com&gt;
Tested-by: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm: fix writing to /sys/class/drm/*/status</title>
<updated>2015-06-05T22:27:30Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2015-06-05T22:27:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=38d8571dad8a759bdc051dbff747b189c90658cf'/>
<id>urn:sha1:38d8571dad8a759bdc051dbff747b189c90658cf</id>
<content type='text'>
Writing to a file is supposed to return the number of bytes written.
Returning zero unfortunately causes bash to constantly spin trying
to write to the sysfs file, to such an extent that even ^c and ^z
have no effect.  The only way out of that is to kill the shell and
log back in.  This isn't nice behaviour.

Fix it by returning the number of characters written to sysfs files.

[airlied: used suggestion from Al Viro]
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Lighten sysfs connector 'status'</title>
<updated>2015-03-10T08:59:36Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2015-03-06T12:36:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c484f02d0f02fbbfc6decc945a69aae011041a27'/>
<id>urn:sha1:c484f02d0f02fbbfc6decc945a69aae011041a27</id>
<content type='text'>
Since the beginning, sysfs/connector/status has done a heavyweight
detection of the current connector status. But no user, such as upowerd
or logind, has ever desired to initiate a probe. Move the probing into a
new attribute so that existing readers get the behaviour they desire.

v2: David Herrmann suggested using "echo detect &gt; /sys/.../status" to
trigger the probing, which is a fine idea. This extends that to also
allow the user to apply the force detection overrides at runtime.

v3: Now with airlied's email address fixed! Requires sysfs_streq()

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Use static attribute groups for managing connector sysfs entries</title>
<updated>2015-02-04T14:02:00Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2015-02-04T10:58:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=335f1a62c5a6334c4fc92c3c448d7648408d9b83'/>
<id>urn:sha1:335f1a62c5a6334c4fc92c3c448d7648408d9b83</id>
<content type='text'>
Instead of manual calls of device_create_file() and
device_remove_file(), assign the static attribute groups to the device
with device_create_with_groups().  The conditionally built sysfs
entries are handled via is_visible callback.

This simplifies the code and also avoids the possible races.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Move piles of functions from drmP.h to drm_internal.h</title>
<updated>2014-09-12T09:16:29Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-10T10:43:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=67d0ec4e885cd2af861a14bb9bd59fd23e9644ae'/>
<id>urn:sha1:67d0ec4e885cd2af861a14bb9bd59fd23e9644ae</id>
<content type='text'>
This way drivers can't grow crazy ideas any more, and it also
helps a bit in reviewing EXPORT_SYMBOLS.

v2: Even more stuff. Unfortunately we can't move drm_vm_open_locked
because exynos does some horrible stuff with it.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: make sysfs device always available for minors</title>
<updated>2014-08-05T14:08:21Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-07-23T09:38:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e17280758cc0b4f3d7065554006adcb87448f6c0'/>
<id>urn:sha1:e17280758cc0b4f3d7065554006adcb87448f6c0</id>
<content type='text'>
For each minor we allocate a sysfs device as minor-&gt;kdev. Currently, this
is allocated and registered in drm_minor_register(). This makes it
impossible to add sysfs-attributes to the device before it is registered.
Therefore, they are not added atomically, nor can we move device_add()
*after* -&gt;load() is called.

This patch makes minor-&gt;kdev available early, but only adds the device
during minor-registration. Note that the registration is still called
before -&gt;load() as debugfs needs to be split, too. This will be fixed in
follow-ups.

Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: add register and unregister functions for connectors</title>
<updated>2014-06-19T06:55:28Z</updated>
<author>
<name>Thomas Wood</name>
<email>thomas.wood@intel.com</email>
</author>
<published>2014-05-29T15:57:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=34ea3d386347cd6de4c2fa2491dd85c9e753e7e4'/>
<id>urn:sha1:34ea3d386347cd6de4c2fa2491dd85c9e753e7e4</id>
<content type='text'>
Introduce generic functions to register and unregister connectors. This
provides a common place to add and remove associated user space
interfaces.

Signed-off-by: Thomas Wood &lt;thomas.wood@intel.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: replace drm_get_connector_name() with direct name field use</title>
<updated>2014-06-04T03:17:41Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2014-06-03T11:56:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=259338205c428454515a09654be69a9f6c983513'/>
<id>urn:sha1:259338205c428454515a09654be69a9f6c983513</id>
<content type='text'>
Generated using semantic patch:

@@
expression E;
@@

- drm_get_connector_name(E)
+ E-&gt;name

[airlied: regenerated]

Acked-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/sysfs: fix OOM verification</title>
<updated>2013-11-28T04:35:23Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2013-11-26T11:50:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a1f84f57f9f7a5060f17482fc26b39174ecb7a28'/>
<id>urn:sha1:a1f84f57f9f7a5060f17482fc26b39174ecb7a28</id>
<content type='text'>
Copy/Paste typo.. we need to test for -&gt;kdev instead of -&gt;dev.

Reported-by: Juha Leppänen &lt;juha_efku@dnainternet.net&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/sysfs: fix hotplug regression since lifetime changes</title>
<updated>2013-11-21T11:10:00Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2013-11-21T10:50:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=760c960bd6880cf22a57c0af9ff60c96250aad39'/>
<id>urn:sha1:760c960bd6880cf22a57c0af9ff60c96250aad39</id>
<content type='text'>
airlied:
The lifetime changes introduced in 5bdebb183c9702a8c57a01dff09337be3de337a6
tried to use device_create, however that led to the regression where dev-&gt;type
wasn't getting set correctly. First attempt at fixing it would have led to
a race, so this undoes the device_createa work and does it all manually
making sure the dev-&gt;type is setup before we register the device.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
</feed>
