<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpu/drm/i810, branch v4.4.93</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>drm: move drm_mmap to &lt;drm/drm_legacy.h&gt;</title>
<updated>2014-09-24T01:43:07+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-23T13:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bfbf3c851ce53b914fe98d60ea3fe3fc1ab75b96'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Move drm_memory.c map support declarations to &lt;drm/drm_legacy.h&gt;</title>
<updated>2014-09-12T13:28:12+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-10T10:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=86c1fbd55c6abc72496a45b7cbf1940324983977'/>
<id>86c1fbd55c6abc72496a45b7cbf1940324983977</id>
<content type='text'>
And replace the drm_core_ prefix with drm_legacy_ since really, this
isn't core stuff.

Also drop drm_core_dropmap since it's unused.

v2: Fix up i810.ko fully which somehow slipped through.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And replace the drm_core_ prefix with drm_legacy_ since really, this
isn't core stuff.

Also drop drm_core_dropmap since it's unused.

v2: Fix up i810.ko fully which somehow slipped through.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Create drm legacy driver header</title>
<updated>2014-09-12T09:08:55+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-10T10:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f03b1fc1eb286b73d453c03cdb45a3827726a44'/>
<id>4f03b1fc1eb286b73d453c03cdb45a3827726a44</id>
<content type='text'>
And move a few legayc functions to start things over there.

It compiles ...

Inspired by a patch from Dave Airlie, but with a split between drm.ko
private legacy functions and stuff used by drivers.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And move a few legayc functions to start things over there.

It compiles ...

Inspired by a patch from Dave Airlie, but with a split between drm.ko
private legacy functions and stuff used by drivers.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: move drm-lock API to drm_legacy.h</title>
<updated>2014-09-10T07:43:34+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-08-29T10:12:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bb6d822ec546603bca01f7ba17c52f0f4f80e329'/>
<id>bb6d822ec546603bca01f7ba17c52f0f4f80e329</id>
<content type='text'>
Same as the other legacy APIs, most of this is internal, so prefix it with
drm_legacy_* and move into drm_legacy.h.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Same as the other legacy APIs, most of this is internal, so prefix it with
drm_legacy_* and move into drm_legacy.h.

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;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: add driver-&gt;set_busid() callback</title>
<updated>2014-09-10T07:43:04+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-08-29T10:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=915b4d11b8b9e7b84ba4a4645b6cc7fbc0c071cf'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>i810: use pci_zalloc_consistent</title>
<updated>2014-08-08T22:57:28+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-08-08T21:24:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59e2623b433552d7402dfacd2bc2d7a22a360a4f'/>
<id>59e2623b433552d7402dfacd2bc2d7a22a360a4f</id>
<content type='text'>
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Remove DRM_ARRAY_SIZE() for ARRAY_SIZE()</title>
<updated>2014-06-09T23:36:17+00:00</updated>
<author>
<name>Damien Lespiau</name>
<email>damien.lespiau@intel.com</email>
</author>
<published>2014-06-09T13:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f95aeb17f57c4c98b7f33627e5f51353fd094a93'/>
<id>f95aeb17f57c4c98b7f33627e5f51353fd094a93</id>
<content type='text'>
I cannot see a need to provide a DRM_ version of ARRAY_SIZE(), only used
in a few places. I suspect its usage has been spread by copy &amp; paste
rather than anything else.

Let's just remove it for plain ARRAY_SIZE().

Signed-off-by: Damien Lespiau &lt;damien.lespiau@intel.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I cannot see a need to provide a DRM_ version of ARRAY_SIZE(), only used
in a few places. I suspect its usage has been spread by copy &amp; paste
rather than anything else.

Let's just remove it for plain ARRAY_SIZE().

Signed-off-by: Damien Lespiau &lt;damien.lespiau@intel.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: kill DRIVER_REQUIRE_AGP</title>
<updated>2013-12-18T01:17:53+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-12-11T10:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=24986ee06929a8de3a5b4722ccadf0b85c175264'/>
<id>24986ee06929a8de3a5b4722ccadf0b85c175264</id>
<content type='text'>
Only the two intel drivers need this and they can easily check for
working agp support in their driver -&gt;load callbacks.

This is the only reason why agp initialization could fail, so allows
us to rip out a bit of error handling code in the next patch.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only the two intel drivers need this and they can easily check for
working agp support in their driver -&gt;load callbacks.

This is the only reason why agp initialization could fail, so allows
us to rip out a bit of error handling code in the next patch.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Kill drm perf counter leftovers</title>
<updated>2013-10-09T05:55:33+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2013-10-04T11:53:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0111be42186fc5461b9e9d579014c70869ab3152'/>
<id>0111be42186fc5461b9e9d579014c70869ab3152</id>
<content type='text'>
The user of these counters was killed in

 commit d79cdc8312689b39c6d83718c1c196af4b3cd18c
 Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
 Date:   Thu Aug 8 15:41:32 2013 +0200

    drm: no-op out GET_STATS ioctl

so clean up the leftovers as well.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The user of these counters was killed in

 commit d79cdc8312689b39c6d83718c1c196af4b3cd18c
 Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
 Date:   Thu Aug 8 15:41:32 2013 +0200

    drm: no-op out GET_STATS ioctl

so clean up the leftovers as well.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: rip out drm_core_has_MTRR checks</title>
<updated>2013-08-19T04:11:44+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-08-08T13:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=281856477cdaba70032af502ee7192fe7aa54f69'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
</feed>
