<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/video/fbdev/controlfb.c, branch v5.8</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>video: fbdev: controlfb: fix build for COMPILE_TEST=y &amp;&amp; PPC_PMAC=y &amp;&amp; PPC32=n</title>
<updated>2020-04-29T19:00:25+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-04-29T10:48:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d4f3e2bfc4968eba13ea41bd3040ed76733324b'/>
<id>6d4f3e2bfc4968eba13ea41bd3040ed76733324b</id>
<content type='text'>
powerpc allyesconfig fails like this:

drivers/video/fbdev/controlfb.c: In function 'controlfb_mmap':
drivers/video/fbdev/controlfb.c:756:23: error: implicit declaration of function 'pgprot_cached_wthru'; did you mean 'pgprot_cached'? [-Werror=implicit-function-declaration]
  756 |   vma-&gt;vm_page_prot = pgprot_cached_wthru(vma-&gt;vm_page_prot);
      |                       ^~~~~~~~~~~~~~~~~~~
      |                       pgprot_cached
drivers/video/fbdev/controlfb.c:756:23: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct &lt;anonymous&gt;'} from type 'int'

Fix it by adding missing PPC32 dependency.

Fixes: a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/fe520316-3863-e6c4-9581-5d709f49e906@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
powerpc allyesconfig fails like this:

drivers/video/fbdev/controlfb.c: In function 'controlfb_mmap':
drivers/video/fbdev/controlfb.c:756:23: error: implicit declaration of function 'pgprot_cached_wthru'; did you mean 'pgprot_cached'? [-Werror=implicit-function-declaration]
  756 |   vma-&gt;vm_page_prot = pgprot_cached_wthru(vma-&gt;vm_page_prot);
      |                       ^~~~~~~~~~~~~~~~~~~
      |                       pgprot_cached
drivers/video/fbdev/controlfb.c:756:23: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct &lt;anonymous&gt;'} from type 'int'

Fix it by adding missing PPC32 dependency.

Fixes: a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/fe520316-3863-e6c4-9581-5d709f49e906@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: remove function prototypes part #3</title>
<updated>2020-04-17T13:50:06+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-03-24T13:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=04dff10ffb55ceb9480431b2398f8300a1aa327f'/>
<id>04dff10ffb55ceb9480431b2398f8300a1aa327f</id>
<content type='text'>
Reorder code a bit and then remove no longer needed function
prototypes.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-7-b.zolnierkie@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reorder code a bit and then remove no longer needed function
prototypes.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-7-b.zolnierkie@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: remove function prototypes part #2</title>
<updated>2020-04-17T13:50:05+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-03-24T13:45:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a57eb14ebb00270ac0e679e93ea69110f33697a2'/>
<id>a57eb14ebb00270ac0e679e93ea69110f33697a2</id>
<content type='text'>
Reorder code a bit and then remove no longer needed function
prototypes.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-6-b.zolnierkie@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reorder code a bit and then remove no longer needed function
prototypes.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-6-b.zolnierkie@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: remove function prototypes part #1</title>
<updated>2020-04-17T13:50:04+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-03-24T13:45:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=946e8fd4fbbfea58c1d4ad93ce4fb7401f77308b'/>
<id>946e8fd4fbbfea58c1d4ad93ce4fb7401f77308b</id>
<content type='text'>
Reorder code a bit and then remove no longer needed function
prototypes.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-5-b.zolnierkie@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reorder code a bit and then remove no longer needed function
prototypes.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-5-b.zolnierkie@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: remove obsolete module support</title>
<updated>2020-04-17T13:50:03+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-03-24T13:45:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=72155824e1c94266ea7fec3c384a3b86d0ee2225'/>
<id>72155824e1c94266ea7fec3c384a3b86d0ee2225</id>
<content type='text'>
CONFIG_FB_CONTROL is bool, hence the Apple "control" frame buffer
driver cannot be built as a module.

Replace module_init() by device_initcall().

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-4-b.zolnierkie@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CONFIG_FB_CONTROL is bool, hence the Apple "control" frame buffer
driver cannot be built as a module.

Replace module_init() by device_initcall().

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-4-b.zolnierkie@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: add COMPILE_TEST support</title>
<updated>2020-04-17T13:50:02+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-03-24T13:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a07a63b0e24dd1316d11427601a9f83dc955bb40'/>
<id>a07a63b0e24dd1316d11427601a9f83dc955bb40</id>
<content type='text'>
Add COMPILE_TEST support to controlfb driver for better compile
testing coverage.

While at it:
- convert driver to use eieio() and dcbf() helpers instead of
  open-coding them
- add invalid_vram_cache() helper to avoid code duplication

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-3-b.zolnierkie@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add COMPILE_TEST support to controlfb driver for better compile
testing coverage.

While at it:
- convert driver to use eieio() and dcbf() helpers instead of
  open-coding them
- add invalid_vram_cache() helper to avoid code duplication

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-3-b.zolnierkie@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: fix sparse warning about using incorrect type</title>
<updated>2020-04-17T13:50:01+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2020-03-24T13:45:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=38bf1077cf24cc20fdf459e51bb87b553f4fb79d'/>
<id>38bf1077cf24cc20fdf459e51bb87b553f4fb79d</id>
<content type='text'>
Use in_le32() instead of le32_to_cpup() to fix sparse warning about
improper type of the argument.

Also drop inline keyword from control_par_to_var() prototype
(to match function definition).

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-2-b.zolnierkie@samsung.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use in_le32() instead of le32_to_cpup() to fix sparse warning about
improper type of the argument.

Also drop inline keyword from control_par_to_var() prototype
(to match function definition).

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200324134508.25120-2-b.zolnierkie@samsung.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: constify fb ops across all drivers</title>
<updated>2019-12-05T08:57:53+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2019-12-03T16:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8a48ac339398f21282985bff16552447d41dcfb2'/>
<id>8a48ac339398f21282985bff16552447d41dcfb2</id>
<content type='text'>
Now that the fbops member of struct fb_info is const, we can start
making the ops const as well.

This does not cover all drivers; some actually modify the fbops struct,
for example to adjust for different configurations, and others do more
involved things that I'd rather not touch in practically obsolete
drivers. Mostly this is the low hanging fruit where we can add "const"
and be done with it.

v3:
- un-constify atyfb, mb862xx, nvidia and uvesabf (0day)

v2:
- fix typo (Christophe de Dinechin)
- use "static const" instead of "const static" in mx3fb.c
- also constify smscufx.c

Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/ce67f14435f3af498f2e8bf35ce4be11f7504132.1575390740.git.jani.nikula@intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the fbops member of struct fb_info is const, we can start
making the ops const as well.

This does not cover all drivers; some actually modify the fbops struct,
for example to adjust for different configurations, and others do more
involved things that I'd rather not touch in practically obsolete
drivers. Mostly this is the low hanging fruit where we can add "const"
and be done with it.

v3:
- un-constify atyfb, mb862xx, nvidia and uvesabf (0day)

v2:
- fix typo (Christophe de Dinechin)
- use "static const" instead of "const static" in mx3fb.c
- also constify smscufx.c

Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/ce67f14435f3af498f2e8bf35ce4be11f7504132.1575390740.git.jani.nikula@intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: controlfb: fix warnings about comparing pointer to 0</title>
<updated>2019-06-21T13:13:14+00:00</updated>
<author>
<name>Shobhit Kukreti</name>
<email>shobhitkukreti@gmail.com</email>
</author>
<published>2019-06-21T13:13:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=acf7287e77852cf787c45980c27bfbdca7d94b0d'/>
<id>acf7287e77852cf787c45980c27bfbdca7d94b0d</id>
<content type='text'>
Fix warnings aboout comparing pointer to 0 reported by coccicheck:

drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0

Also while at it change return value to -ENOMEM on kzalloc() failure.

Signed-off-by: Shobhit Kukreti &lt;shobhitkukreti@gmail.com&gt;
Reviewed-by: Mathieu Malaterre &lt;malat@debian.org&gt;
[b.zolnierkie: minor fixups]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix warnings aboout comparing pointer to 0 reported by coccicheck:

drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0

Also while at it change return value to -ENOMEM on kzalloc() failure.

Signed-off-by: Shobhit Kukreti &lt;shobhitkukreti@gmail.com&gt;
Reviewed-by: Mathieu Malaterre &lt;malat@debian.org&gt;
[b.zolnierkie: minor fixups]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<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:45+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2019-01-15T04:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=066ac5c3c4bb467d6e8c7255e36c77060efe5ef7'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
</feed>
