<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/video/fbdev/matrox/matroxfb_base.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-01-22T09:21:45Z</updated>
<entry>
<title>powerpc, fbdev: Use NV_CMODE and NV_VMODE only when CONFIG_PPC32 &amp;&amp; CONFIG_PPC_PMAC &amp;&amp; CONFIG_NVRAM</title>
<updated>2019-01-22T09:21:45Z</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2019-01-15T04:18:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=066ac5c3c4bb467d6e8c7255e36c77060efe5ef7'/>
<id>urn:sha1:066ac5c3c4bb467d6e8c7255e36c77060efe5ef7</id>
<content type='text'>
This patch addresses inconsistencies in Mac framebuffer drivers and their
use of Kconfig symbols relating to NVRAM, so PPC64 can use CONFIG_NVRAM.

The defined(CONFIG_NVRAM) condition is replaced with the weaker
IS_REACHABLE(CONFIG_NVRAM) condition, like atari_scsi.

Macintosh framebuffer drivers use default settings for color mode and
video mode that are found in NVRAM. On PCI Macs, MacOS stores display
settings in the Name Registry (NR) partition in NVRAM*. On NuBus Macs,
there is no NR partition and MacOS stores display mode settings in PRAM**.

Early-model Macs are the ones most likely to benefit from these settings,
since they are more likely to have a fixed-frequency monitor connected to
the built-in framebuffer device. Moreover, a single NV_CMODE value and
a single NV_VMODE value provide for only one display.

The NV_CMODE and NV_VMODE constants are apparently offsets into the NR
partition for Old World machines. This also suggests that these defaults
are not useful on later models. The NR partition seems to be optional on
New World machines. CONFIG_NVRAM cannot be enabled on PPC64 at present.

It is safe to say that NVRAM support in PowerMac fbdev drivers is only
applicable to CONFIG_PPC32 so make this condition explicit. This means
matroxfb driver won't crash on PPC64 when CONFIG_NVRAM becomes available
there.

For imsttfb, add the missing CONFIG_NVRAM test to prevent a build failure,
since PPC64 does not implement nvram_read_byte(). Also add a missing
machine_is(powermac) check. Change the inconsistent dependency on
CONFIG_PPC and the matching #ifdef tests to CONFIG_PPC_PMAC.

For valkyriefb, to improve clarity and consistency with the other PowerMac
fbdev drivers, test for CONFIG_PPC_PMAC instead of !CONFIG_MAC. Remove a
bogus comment regarding PRAM.

* See GetPreferredConfiguration and SavePreferredConfiguration in
"Designing PCI Cards and Drivers for Power Macintosh Computers".

** See SetDefaultMode and GetDefaultMode in "Designing Cards and Drivers
for the Macintosh Family".

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Replace nvram_* extern declarations with standard header</title>
<updated>2019-01-22T09:21:43Z</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2019-01-15T04:18:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a156c7ba669c65b55c7afcc3994e1199cc0cad47'/>
<id>urn:sha1:a156c7ba669c65b55c7afcc3994e1199cc0cad47</id>
<content type='text'>
Remove the nvram_read_byte() and nvram_write_byte() declarations in
powerpc/include/asm/nvram.h and use the cross-platform static functions
in linux/nvram.h instead.

Tested-by: Stan Johnson &lt;userm57@yahoo.com&gt;
Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>video: fbdev: matroxfb: return -ENOMEM on allocation failure</title>
<updated>2017-10-12T16:18:23Z</updated>
<author>
<name>Allen Pais</name>
<email>allen.lkml@gmail.com</email>
</author>
<published>2017-10-12T16:18:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0619d9e8f101320ee0ee95e8071031c9217d50a3'/>
<id>urn:sha1:0619d9e8f101320ee0ee95e8071031c9217d50a3</id>
<content type='text'>
Signed-off-by: Allen Pais &lt;allen.lkml@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: make fb_videomode const</title>
<updated>2017-09-04T14:00:49Z</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-09-04T14:00:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=58ec01cebafd4b9fc039c12c744013e9c71ec802'/>
<id>urn:sha1:58ec01cebafd4b9fc039c12c744013e9c71ec802</id>
<content type='text'>
Make these const as they are only passed to a const argument of the
function fb_find_mode.

Done using Coccinelle.

@match disable optional_qualifier@
identifier s;
@@
static struct fb_videomode s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
expression list[5] es;
position ref.p;
@@
fb_find_mode(es,&amp;s@p,...)

@bad depends on  !good1@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct fb_videomode s;

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: matrox: make fb_ops const</title>
<updated>2017-08-21T14:49:58Z</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-08-21T14:49:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6ff10485262bf1b9f0e2db4a25287796f6a519c3'/>
<id>urn:sha1:6ff10485262bf1b9f0e2db4a25287796f6a519c3</id>
<content type='text'>
Make fb_ops const as it is only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: matrox: hide unused 'hotplug' variable</title>
<updated>2017-08-07T15:22:14Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-08-07T15:22:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ad3f3f6eb1fbec716a61dbe46565dcd9ca94387'/>
<id>urn:sha1:5ad3f3f6eb1fbec716a61dbe46565dcd9ca94387</id>
<content type='text'>
The variable has become unused in modular configurations
which triggers a harmless warning:

drivers/video/fbdev/matrox/matroxfb_base.c:1583:12: error: 'hotplug' defined but not used [-Werror=unused-variable]

This moves it into an #ifdef section of the file, matching
all its references.

Fixes: 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: Nuke FBINFO_MODULE</title>
<updated>2017-08-01T15:33:02Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-08-01T15:33:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=376b3ff54c9a1cd54d71b1102e061fccf56d535e'/>
<id>urn:sha1:376b3ff54c9a1cd54d71b1102e061fccf56d535e</id>
<content type='text'>
Instead check info-&gt;ops-&gt;owner, which amounts to the same.

Spotted because I want to remove the pile of broken and cargo-culted
fb_info-&gt;flags assignments in drm drivers.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: matroxfb: constify pci_device_id.</title>
<updated>2017-08-01T15:20:45Z</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-08-01T15:20:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c564dbcdc9914529e2cd18367d8bb98cef417611'/>
<id>urn:sha1:c564dbcdc9914529e2cd18367d8bb98cef417611</id>
<content type='text'>
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by &lt;linux/pci.h&gt; work with
const pci_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
  19884	   3036	     96	  23016	   59e8	fbdev/matrox/matroxfb_base.o

File size after adding 'const':
   text	   data	    bss	    dec	    hex	filename
  20300	   2620	     96	  23016	   59e8	fbdev/matrox/matroxfb_base.o

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Maik Broemme &lt;mbroemme@libmpq.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: matrox: the list iterator can't be NULL</title>
<updated>2017-07-04T15:47:23Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-07-04T15:47:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=360772f26407b759ec3a91dda81fdbc74b7f7f2c'/>
<id>urn:sha1:360772f26407b759ec3a91dda81fdbc74b7f7f2c</id>
<content type='text'>
My static checker is complaining because we check "drv" for NULL and
then we dereference it to get the next item in the list.  It can't be
NULL so we can remove this check.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: matrox: use arch_phys_wc_add() and ioremap_wc()</title>
<updated>2015-06-03T09:41:49Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@suse.com</email>
</author>
<published>2015-04-21T20:16:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=888ca5d26ad5975fbe69f0bc1cca5756b529c785'/>
<id>urn:sha1:888ca5d26ad5975fbe69f0bc1cca5756b529c785</id>
<content type='text'>
This driver uses the same ioremap()'d area for the MTRR.
Convert the driver from using the x86 specific MTRR code to
the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
will avoid MTRR if write-combining is available, in order to
take advantage of that also ensure the ioremap'd area is requested
as write-combining.

There are a few motivations for this:

a) Take advantage of PAT when available

b) Help bury MTRR code away, MTRR is architecture specific and on
   x86 its replaced by PAT

c) Help with the goal of eventually using _PAGE_CACHE_UC over
   _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
   de33c442e titled "x86 PAT: fix performance drop for glx,
   use UC minus for ioremap(), ioremap_nocache() and
   pci_mmap_page_range()")

The conversion done is expressed by the following Coccinelle
SmPL patch, it additionally required manual intervention to
address all the #ifdery and removal of redundant things which
arch_phys_wc_add() already addresses such as verbose message
about when MTRR fails and doing nothing when we didn't get
an MTRR.

@ mtrr_found @
expression index, base, size;
@@

-index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+index = arch_phys_wc_add(base, size);

@ mtrr_rm depends on mtrr_found @
expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
@@

-mtrr_del(index, base, size);
+arch_phys_wc_del(index);

@ mtrr_rm_zero_arg depends on mtrr_found @
expression mtrr_found.index;
@@

-mtrr_del(index, 0, 0);
+arch_phys_wc_del(index);

@ mtrr_rm_fb_info depends on mtrr_found @
struct fb_info *info;
expression mtrr_found.index;
@@

-mtrr_del(index, info-&gt;fix.smem_start, info-&gt;fix.smem_len);
+arch_phys_wc_del(index);

@ ioremap_replace_nocache depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info-&gt;screen_base = ioremap_nocache(base, size);
+info-&gt;screen_base = ioremap_wc(base, size);

@ ioremap_replace_default depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info-&gt;screen_base = ioremap(base, size);
+info-&gt;screen_base = ioremap_wc(base, size);

Generated-by: Coccinelle SmPL

Cc: Jean-Christophe Plagniol-Villard &lt;plagnioj@jcrosoft.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Cc: Suresh Siddha &lt;sbsiddha@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez &lt;mcgrof@suse.com&gt;
Reviewed-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</content>
</entry>
</feed>
