<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/gpu/drm/drm_drv.c, branch dev-4.17</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.17</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.17'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2018-05-11T13:06:05+00:00</updated>
<entry>
<title>drm: Match sysfs name in link removal to link creation</title>
<updated>2018-05-11T13:06:05+00:00</updated>
<author>
<name>Haneen Mohammed</name>
<email>hamohammed.sa@gmail.com</email>
</author>
<published>2018-05-11T04:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7f6df440b8623c441c42d070bf592e2d2c1fa9bb'/>
<id>urn:sha1:7f6df440b8623c441c42d070bf592e2d2c1fa9bb</id>
<content type='text'>
This patch matches the sysfs name used in the unlinking with the
linking function. Otherwise, remove_compat_control_link() fails to remove
sysfs created by create_compat_control_link() in drm_dev_register().

Fixes: 6449b088dd51 ("drm: Add fake controlD* symlinks for backwards
compat")
Cc: Dave Airlie &lt;airlied@gmail.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: &lt;stable@vger.kernel.org&gt; # v4.10+
Signed-off-by: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
[seanpaul added Fixes and Cc tags]
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180511041542.GA4253@haneen-vb
</content>
</entry>
<entry>
<title>drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem</title>
<updated>2018-03-06T07:14:16+00:00</updated>
<author>
<name>Joe Moriarty</name>
<email>joe.moriarty@oracle.com</email>
</author>
<published>2018-02-20T19:11:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3bd07ccd27622d598fd9d87f3032dd457ad62083'/>
<id>urn:sha1:3bd07ccd27622d598fd9d87f3032dd457ad62083</id>
<content type='text'>
The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer dereference problem.

- drivers/gpu/drm/drm_drv.c
Any calls to drm_minor_get_slot() could result in the return of a NULL
pointer when an invalid DRM device type is encountered.  The
return of NULL was removed with BUG() from drm_minor_get_slot().

Signed-off-by: Joe Moriarty &lt;joe.moriarty@oracle.com&gt;
Reviewed-by: Steven Sistare &lt;steven.sistare@oracle.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180220191157.100960-3-joe.moriarty@oracle.com
</content>
</entry>
<entry>
<title>Merge airlied/drm-next into drm-misc-next</title>
<updated>2017-11-21T13:17:56+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-11-21T10:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=70c5f93669249886b151812076509f30569aff80'/>
<id>urn:sha1:70c5f93669249886b151812076509f30569aff80</id>
<content type='text'>
Bake in the conflict between the drm_print.h extraction and the
addition of DRM_DEBUG_LEASES since we lost it a few too many times.

Also fix a new use of drm_plane_helper_check_state in msm to follow
Ville's conversion in

commit a01cb8ba3f6282934cff65e89ab36b18b14cbe27
Author: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Date:   Wed Nov 1 22:16:19 2017 +0200

    drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c

Acked-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Add new LEASE debug level</title>
<updated>2017-10-25T06:31:29+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2017-03-17T22:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=e7646f84ad4f654e1ee503b03a12e520d947884f'/>
<id>urn:sha1:e7646f84ad4f654e1ee503b03a12e520d947884f</id>
<content type='text'>
Separate out lease debugging from the core.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Move debug macros out of drmP.h</title>
<updated>2017-10-20T17:14:48+00:00</updated>
<author>
<name>Haneen Mohammed</name>
<email>hamohammed.sa@gmail.com</email>
</author>
<published>2017-10-18T04:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=02c9656b2f0d6997939933d8573c2ffb587427e6'/>
<id>urn:sha1:02c9656b2f0d6997939933d8573c2ffb587427e6</id>
<content type='text'>
This patch extract DRM_* debug macros from drmP.h to drm_print.h and
move printing related functions used by these macros from drm_drv.[hc]
to drm_print.[hc].

Signed-off-by: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/4020bc7c5ffad2af516919f78bb837c7f366b82b.1508297716.git.hamohammed.sa@gmail.com
</content>
</entry>
<entry>
<title>drm: introduce drm_dev_{get/put} functions</title>
<updated>2017-09-26T11:12:15+00:00</updated>
<author>
<name>Aishwarya Pant</name>
<email>aishpant@gmail.com</email>
</author>
<published>2017-09-26T08:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9a96f55034e41b4e002b767e9218d55f03bdff7d'/>
<id>urn:sha1:9a96f55034e41b4e002b767e9218d55f03bdff7d</id>
<content type='text'>
Reference counting functions in the kernel typically use get/put suffixes. For
maintaining coding style consistency, introduce drm_dev_{get/put} functions. All
callers of drm_dev_ref() API have been converted in this patch and hence it has
been dropped while the drm_dev_unref() API with non-trivial number of users
remains for compatibility.

The semantic patch scripts/coccinelle/api/drm-get-put.cocci has been updated
with the new helper for conversion of drm_dev_unref() to drm_dev_put()

Signed-off-by: Aishwarya Pant &lt;aishpant@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/6babda56134035a98220d5d37a4fd4048df214ce.1506413698.git.aishpant@gmail.com
</content>
</entry>
<entry>
<title>drm: Clean up drm_dev_unplug</title>
<updated>2017-08-11T08:49:21+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-08-02T11:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=0469901ea4beaa4a326ffcc9b1d6b5baf9738a42'/>
<id>urn:sha1:0469901ea4beaa4a326ffcc9b1d6b5baf9738a42</id>
<content type='text'>
Use drm_dev_unregister to unregister the interfaces, which also allows
us to simplify the open_count == 0 case.

Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170802115604.12734-5-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Only lastclose on unload for legacy drivers</title>
<updated>2017-08-11T08:48:12+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-08-02T11:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=2e45eeac7c1f80a90768e667545591a1e25ff288'/>
<id>urn:sha1:2e45eeac7c1f80a90768e667545591a1e25ff288</id>
<content type='text'>
The only thing modern drivers are supposed to do in lastclose is
restore the fb emulation state. Which is entirely optional, and
there's really no reason to do that. So restrict it to legacy drivers
(where the driver cleanup essentially happens in lastclose).

This will also allow us to share the unregister function with
drm_dev_unplug().

Quoting my reply to Alex on dri-devel:
On Thu, Aug 3, 2017 at 1:17 AM, Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; wrote:
&gt; On Wed, Aug 2, 2017 at 10:50 PM, Alex Deucher &lt;alexdeucher@gmail.com&gt; wrote:
&gt;&gt; On Wed, Aug 2, 2017 at 7:56 AM, Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; wrote:
&gt;&gt;&gt; The only thing modern drivers are supposed to do in lastclose is
&gt;&gt;&gt; restore the fb emulation state. Which is entirely optional, and
&gt;&gt;&gt; there's really no reason to do that. So restrict it to legacy drivers
&gt;&gt;&gt; (where the driver cleanup essentially happens in lastclose).
&gt;&gt;
&gt;&gt; vga_switcheroo_process_delayed_switch() gets called in lastclose.
&gt;&gt; Won't that need to get moved elsewhere for this to work?
&gt;
&gt; Hm right, I forgot the lazy way to do runtime pm by keeping the device
&gt; alive as long as anyone has an open fd for it ... This shouldn't be a
&gt; problem, since you need to unregister from vgaswitcheroo anyway on
&gt; unload. Maybe that blows up, I'll check the code and augment the patch
&gt; as needed.

So I think there's 3 cases:
- Trying to unload the module. You can't do that while anyone has the
fd still open, so lastclose is guaranteeed to run.
- Forcefully unbinding the driver through sysfs. Not any better, since
the can_switch stuff checks for the open count, and so will delay the
delayed switch no matter what.
- Actual hotremoval: a) not implemented since none of the drivers
taking part in vgaswitcheroo correctly unplug the drm device and b)
you can't hotremove a chip from a laptop.

v2: Extend commit message with m-l discussion.

Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170802115604.12734-4-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Document device unplug infrastructure</title>
<updated>2017-08-11T08:48:03+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-08-02T11:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c07dcd61a0e57c6840c23d90cb1beddad7d682a1'/>
<id>urn:sha1:c07dcd61a0e57c6840c23d90cb1beddad7d682a1</id>
<content type='text'>
While at it, also ocd and give them a consistent drm_dev_ prefix, like
the other device instance functionality. Plus move the functions into
the right places.

Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170802115604.12734-3-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: inhibit drm drivers register to uninitialized drm core</title>
<updated>2017-07-11T10:03:11+00:00</updated>
<author>
<name>Alexandru Moise</name>
<email>00moses.alexander00@gmail.com</email>
</author>
<published>2017-07-08T21:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=371c2279aa705c32730e738b3f173fb2e62b33e7'/>
<id>urn:sha1:371c2279aa705c32730e738b3f173fb2e62b33e7</id>
<content type='text'>
If the DRM core fails to init for whatever reason, ensure that
no driver ever calls drm_dev_register().

This is best done at drm_dev_init() as it covers drivers that call
drm_dev_alloc() as well as drivers that prefer to embed struct
drm_device into their own device struct and call drm_dev_init()
themselves.

In my case I had so many dynamic device majors used that the major
number for DRM (226) was stolen, causing DRM core init to fail after
failing to register a chrdev, and ultimately calling debugfs_remove()
on drm_debugfs_root in drm_core_exit().

After drm core failed to init, VGEM was still calling drm_dev_register(),
ultimately leading to drm_debugfs_init(), with drm_debugfs_root passed
as the root for the new debugfs dir at debugfs_create_dir().

This led to a kernel panic once we were either derefencing root-&gt;d_inode
while it was NULL or calling root-&gt;d_inode-&gt;i_op-&gt;lookup() while it was
NULL in debugfs at inode_lock() or lookup_*().

Signed-off-by: Alexandru Moise &lt;00moses.alexander00@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170708214352.GA27205@gmail.com
</content>
</entry>
</feed>
