<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/sis/sis_drv.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-06-20T08:41:03Z</updated>
<entry>
<title>drm/pci: Deprecate drm_pci_init/exit completely</title>
<updated>2017-06-20T08:41:03Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-05-24T14:51:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=10631d724deff712343d96dd3017cd323349f761'/>
<id>urn:sha1:10631d724deff712343d96dd3017cd323349f761</id>
<content type='text'>
The magic switching between proper pci driver and shadow-attach isn't
useful anymore since there's no ums+kms drivers left. Let's split this
up properly, calling pci_register_driver for kms drivers and renaming
the shadow-attach init to drm_legacy_pci_init/exit.

Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-6-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Remove drm_driver-&gt;set_busid hook</title>
<updated>2017-06-20T08:40:49Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-05-24T14:51:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5c484cee7ef9c4fd29fa0ba09640d55960977145'/>
<id>urn:sha1:5c484cee7ef9c4fd29fa0ba09640d55960977145</id>
<content type='text'>
The only special-case is pci devices, and we can easily handle this in
the core. Do so and drop a pile of boilerplate from drivers.

Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-5-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Change the return type of the unload hook to void</title>
<updated>2017-01-09T10:25:22Z</updated>
<author>
<name>Gabriel Krisman Bertazi</name>
<email>krisman@collabora.co.uk</email>
</author>
<published>2017-01-06T17:57:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=11b3c20bdd15d17382068be569740de1dccb173d'/>
<id>urn:sha1:11b3c20bdd15d17382068be569740de1dccb173d</id>
<content type='text'>
The integer returned by the unload hook is ignored by the drm core, so
let's make it void.

This patch was created using the following Coccinelle semantic script
(except for the declaration and comment in drm_drv.h):

Compile-tested only.

// &lt;smpl&gt;
@ get_name @
struct drm_driver drv;
identifier fn;
@@
drv.unload = fn;

@ replace_type @
identifier get_name.fn;
@@
- int
+ void
fn (...)
{
...
}

@ remove_return_param @
identifier get_name.fn;
@@
void fn (...)
{
&lt;...
if (...)
return
- ...
;
...&gt;
 }

@ drop_final_return @
identifier get_name.fn;
@@
void fn (...)
{
...

- return 0;
}
// &lt;/smpl&gt;

Suggested-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.co.uk&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;.
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170106175731.29196-1-krisman@collabora.co.uk
</content>
</entry>
<entry>
<title>drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs</title>
<updated>2016-11-02T15:33:47Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2016-11-01T15:40:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55edf41b699bcb31dcf45082d99e91b7e217206e'/>
<id>urn:sha1:55edf41b699bcb31dcf45082d99e91b7e217206e</id>
<content type='text'>
If we define drm_compat_ioctl NULL on CONFIG_COMPAT=n, we don't have to
check for the config everywhere.

Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1478014844-27454-1-git-send-email-jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm: Mark up legacy/dri1 drivers with DRM_LEGACY</title>
<updated>2016-08-08T08:05:22Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-08-03T19:11:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3cbf6a5deb2f4a469de7a90a3cc169e8fcba95e2'/>
<id>urn:sha1:3cbf6a5deb2f4a469de7a90a3cc169e8fcba95e2</id>
<content type='text'>
It's super confusing that new drivers need to be marked with
DRIVER_MODESET when really it means DRIVER_MODERN. Much better to
invert the meaning and rename it to something that's suitably
off-putting.

Since there's over 100 places using DRIVER_MODESET we need to roll out
this change without a flag day.

v2: Update docs.

Reviewed-by: Frank Binns &lt;frank.binns@imgtec.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-1-git-send-email-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: move drm_mmap to &lt;drm/drm_legacy.h&gt;</title>
<updated>2014-09-24T01:43:07Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-23T13:46:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bfbf3c851ce53b914fe98d60ea3fe3fc1ab75b96'/>
<id>urn:sha1:bfbf3c851ce53b914fe98d60ea3fe3fc1ab75b96</id>
<content type='text'>
Now that we've removed the copypasted users in gem/ttm we can
relegate the legacy buffer mapping support to where it belongs.
Also give it the proper drm_legacy_ prefix.

While at it statify drm_mmap_locked, somehow I've missed that in my
previous header rework.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: add driver-&gt;set_busid() callback</title>
<updated>2014-09-10T07:43:04Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-08-29T10:12:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=915b4d11b8b9e7b84ba4a4645b6cc7fbc0c071cf'/>
<id>urn:sha1:915b4d11b8b9e7b84ba4a4645b6cc7fbc0c071cf</id>
<content type='text'>
One step closer to dropping all the drm_bus_* code:
Add a driver-&gt;set_busid() callback and make all drivers use the generic
helpers. Nouveau is the only driver that uses two different bus-types with
the same drm_driver. This is totally broken if both buses are available on
the same machine (unlikely, but lets be safe). Therefore, we create two
different drivers for each platform during module_init() and set the
set_busid() callback respectively.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drivers: gpu: Mark function as static in sis_drv.c</title>
<updated>2014-01-14T03:04:33Z</updated>
<author>
<name>Rashika</name>
<email>rashika.kheria@gmail.com</email>
</author>
<published>2014-01-06T16:41:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=902f4a7400df915ccd84c87e1cc89a2e89f96ceb'/>
<id>urn:sha1:902f4a7400df915ccd84c87e1cc89a2e89f96ceb</id>
<content type='text'>
Mark function as static because it is not used outside the file
drm/sis/sis_drv.c.

This eliminates the following warning in drm/sis/sis_drv.c:
drivers/gpu/drm/sis/sis_drv.c:97:6: warning: no previous prototype for ‘sis_driver_postclose’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria &lt;rashika.kheria@gmail.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: rip out drm_core_has_MTRR checks</title>
<updated>2013-08-19T04:11:44Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-08-08T13:41:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=281856477cdaba70032af502ee7192fe7aa54f69'/>
<id>urn:sha1:281856477cdaba70032af502ee7192fe7aa54f69</id>
<content type='text'>
The new arch_phys_wc_add/del functions do the right thing both with
and without MTRR support in the kernel. So we can drop these
additional checks.

David Herrmann suggest to also kill the DRIVER_USE_MTRR flag since
it's now unused, which spurred me to do a bit a better audit of the
affected drivers. David helped a lot in that. Quoting our mail
discussion:

On Wed, Jul 10, 2013 at 5:41 PM, David Herrmann &lt;dh.herrmann@gmail.com&gt; wrote:
&gt; On Wed, Jul 10, 2013 at 5:22 PM, Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; wrote:
&gt;&gt; On Wed, Jul 10, 2013 at 3:51 PM, David Herrmann &lt;dh.herrmann@gmail.com&gt; wrote:
&gt;&gt;&gt;&gt; -#if __OS_HAS_MTRR
&gt;&gt;&gt;&gt; -static inline int drm_core_has_MTRR(struct drm_device *dev)
&gt;&gt;&gt;&gt; -{
&gt;&gt;&gt;&gt; -       return drm_core_check_feature(dev, DRIVER_USE_MTRR);
&gt;&gt;&gt;&gt; -}
&gt;&gt;&gt;&gt; -#else
&gt;&gt;&gt;&gt; -#define drm_core_has_MTRR(dev) (0)
&gt;&gt;&gt;&gt; -#endif
&gt;&gt;&gt;&gt; -
&gt;&gt;&gt;
&gt;&gt;&gt; That was the last user of DRIVER_USE_MTRR (apart from drivers setting
&gt;&gt;&gt; it in .driver_features). Any reason to keep it around?
&gt;&gt;
&gt;&gt; Yeah, I guess we could rip things out. Which will also force me to
&gt;&gt; properly audit drivers for the eventual behaviour change this could
&gt;&gt; entail (in case there's an x86 driver which did not ask for an mtrr,
&gt;&gt; but iirc there isn't).
&gt;
&gt; david@david-mb ~/dev/kernel/linux $ for i in drivers/gpu/drm/* ; do if
&gt; test -d "$i" ; then if ! grep -q USE_MTRR -r $i ; then echo $i ; fi ;
&gt; fi ; done
&gt; drivers/gpu/drm/exynos
&gt; drivers/gpu/drm/gma500
&gt; drivers/gpu/drm/i2c
&gt; drivers/gpu/drm/nouveau
&gt; drivers/gpu/drm/omapdrm
&gt; drivers/gpu/drm/qxl
&gt; drivers/gpu/drm/rcar-du
&gt; drivers/gpu/drm/shmobile
&gt; drivers/gpu/drm/tilcdc
&gt; drivers/gpu/drm/ttm
&gt; drivers/gpu/drm/udl
&gt; drivers/gpu/drm/vmwgfx
&gt; david@david-mb ~/dev/kernel/linux $
&gt;
&gt; So for x86 gma500,nouveau,qxl,udl,vmwgfx don't set DRIVER_USE_MTRR.
&gt; But I cannot tell whether they break if we call arch_phys_wc_add/del,
&gt; anyway. At least nouveau seemed to work here, but it doesn't use AGP
&gt; or drm_bufs, I guess.

Cool, thanks a lot for stitching together the list of drivers to look
at. So for real KMS drivers it's the drives responsibility to add an
mtrr if it needs one. nouvea, radeon, mgag200, i915 and vmwgfx do that
already. Somehow the savage driver also ends up doing that, I have no
idea why.

Note that gma500 as a pure KMS driver doesn't need MTRR setup since
the platforms that it supports all support PAT. So no MTRRs needed to
get wc iomappings.

The mtrr support in the drm core is all for legacy mappings of garts,
framebuffers and registers. All legacy drivers set the USE_MTRR flag,
so we're good there.

All in all I think we can really just ditch this

/endquote

v2: Also kill DRIVER_USE_MTRR as suggested by David Herrmann

v3: Rebase on top of David Herrmann's agp setup/cleanup changes.

Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: remove FASYNC support</title>
<updated>2013-08-19T00:05:17Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-08-08T13:41:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b0e898ac555e96e7863a5ee95d70f3625f1db5e2'/>
<id>urn:sha1:b0e898ac555e96e7863a5ee95d70f3625f1db5e2</id>
<content type='text'>
So I've stumbled over drm_fasync and wondered what it does. Digging
that up is quite a story.

First I've had to read up on what this does and ended up being rather
bewildered why peopled loved signals so much back in the days that
they've created SIGIO just for that ...

Then I wondered how this ever works, and what that strange "No-op."
comment right above it should mean. After all calling the core fasync
helper is pretty obviously not a noop. After reading through the
kernels FASYNC implementation I've noticed that signals are only sent
out to the processes attached with FASYNC by calling kill_fasync.

No merged drm driver has ever done that.

After more digging I've found out that the only driver that ever used
this is the so called GAMMA driver. I've frankly never heard of such a
gpu brand ever before. Now FASYNC seems to not have been the only bad
thing with that driver, since Dave Airlie removed it from the drm
driver with prejudice:

commit 1430163b4bbf7b00367ea1066c1c5fe85dbeefed
Author: Dave Airlie &lt;airlied@linux.ie&gt;
Date:   Sun Aug 29 12:04:35 2004 +0000

    Drop GAMMA DRM from a great height ...

Long story short, the drm fasync support seems to be doing absolutely
nothing. And the only user of it was never merged into the upstream
kernel. And we don't need any fops-&gt;fasync callback since the fcntl
implementation in the kernel already implements the noop case
correctly.

So stop this particular cargo-cult and rip it all out.

v2: Kill drm_fasync assignments in rcar (newly added) and imx drivers
(somehow I've missed that one in staging). Also drop the reference in
the drm DocBook. ARM compile-fail reported by Rob Clark.

v3: Move the removal of dev-&gt;buf_asnyc assignment in drm_setup to this
patch here.

v4: Actually git add ... tsk.

Cc: Dave Airlie &lt;airlied@linux.ie&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
</feed>
