* [PATCH] fbdev/ffb: fix corrupted video output on FFB1
@ 2026-02-05 15:49 René Rebe
2026-02-06 10:12 ` Helge Deller
0 siblings, 1 reply; 5+ messages in thread
From: René Rebe @ 2026-02-05 15:49 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-fbdev
Fix Sun FFB1 corrupted video out [1] by disabling overlay and
initializing window mode to a known state. The issue never appeared on
my FFB2+/vertical nor Elite3D/M6. It could also depend on the PROM
version.
/SUNW,ffb@1e,0: FFB at 000001fc00000000, type 11, DAC pnum[236c] rev[10] manuf_rev[4]
X (II) /dev/fb0: Detected FFB1, Z-buffer, Single-buffered.
X (II) /dev/fb0: BT9068 (PAC1) ramdac detected (with normal cursor control)
X (II) /dev/fb0: Detected Creator/Creator3D
[1] https://www.instagram.com/p/DUTcSmSjSem/
Signed-off-by: René Rebe <rene@exactco.de>
Cc: stable@kernel.org
---
Tested on Sun Ultra 2 w/ FFB1 BT9068 (PAC1) ramdac running T2/Linux.
Defines re-used from xf86-video-sunffb.
---
diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
index 34b6abff9493..8d77f102dd82 100644
--- a/drivers/video/fbdev/ffb.c
+++ b/drivers/video/fbdev/ffb.c
@@ -335,6 +335,9 @@ struct ffb_dac {
};
#define FFB_DAC_UCTRL 0x1001 /* User Control */
+#define FFB_DAC_UCTRL_OVENAB 0x00000008 /* Overlay Enable */
+#define FFB_DAC_UCTRL_WMODE 0x00000030 /* Window Mode */
+#define FFB_DAC_UCTRL_WM_COMB 0x00000000 /* Window Mode = Combined */
#define FFB_DAC_UCTRL_MANREV 0x00000f00 /* 4-bit Manufacturing Revision */
#define FFB_DAC_UCTRL_MANREV_SHIFT 8
#define FFB_DAC_TGEN 0x6000 /* Timing Generator */
@@ -425,7 +428,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
{
struct ffb_fbc __iomem *fbc = par->fbc;
struct ffb_dac __iomem *dac = par->dac;
- unsigned long flags;
+ unsigned long flags, uctrl;
spin_lock_irqsave(&par->lock, flags);
FFBWait(par);
@@ -442,7 +445,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
upa_writel(par->bg_cache, &fbc->bg);
FFBWait(par);
- /* Disable cursor. */
+ /* Disable cursor. */
upa_writel(FFB_DAC_CUR_CTRL, &dac->type2);
if (par->flags & FFB_FLAG_INVCURSOR)
upa_writel(0, &dac->value2);
@@ -450,6 +453,15 @@ static void ffb_switch_from_graph(struct ffb_par *par)
upa_writel((FFB_DAC_CUR_CTRL_P0 |
FFB_DAC_CUR_CTRL_P1), &dac->value2);
+ /* Disable overlay and window modes. */
+ upa_writel(FFB_DAC_UCTRL, &dac->type);
+ uctrl = upa_readl(&dac->value);
+ uctrl &= ~FFB_DAC_UCTRL_WMODE;
+ uctrl |= FFB_DAC_UCTRL_WM_COMB;
+ uctrl &= ~FFB_DAC_UCTRL_OVENAB;
+ upa_writel(FFB_DAC_UCTRL, &dac->type);
+ upa_writel(uctrl, &dac->value);
+
spin_unlock_irqrestore(&par->lock, flags);
}
--
René Rebe, ExactCODE GmbH, Berlin, Germany
https://exactco.de • https://t2linux.com • https://patreon.com/renerebe
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] fbdev/ffb: fix corrupted video output on FFB1
2026-02-05 15:49 [PATCH] fbdev/ffb: fix corrupted video output on FFB1 René Rebe
@ 2026-02-06 10:12 ` Helge Deller
2026-02-06 10:30 ` René Rebe
0 siblings, 1 reply; 5+ messages in thread
From: Helge Deller @ 2026-02-06 10:12 UTC (permalink / raw)
To: René Rebe; +Cc: linux-fbdev
Hello Rene,
On 2/5/26 16:49, René Rebe wrote:
> Fix Sun FFB1 corrupted video out [1] by disabling overlay and
> initializing window mode to a known state. The issue never appeared on
> my FFB2+/vertical nor Elite3D/M6. It could also depend on the PROM
> version.
>
> /SUNW,ffb@1e,0: FFB at 000001fc00000000, type 11, DAC pnum[236c] rev[10] manuf_rev[4]
> X (II) /dev/fb0: Detected FFB1, Z-buffer, Single-buffered.
> X (II) /dev/fb0: BT9068 (PAC1) ramdac detected (with normal cursor control)
> X (II) /dev/fb0: Detected Creator/Creator3D
>
> [1] https://www.instagram.com/p/DUTcSmSjSem/
The patch itself seems ok.
But could you please link to a freely accessible website instead of Instagram?
I and many others don't have (and don't want) an instagram account, so
the link is not very useful.
Helge
> Signed-off-by: René Rebe <rene@exactco.de>
> Cc: stable@kernel.org
> ---
> Tested on Sun Ultra 2 w/ FFB1 BT9068 (PAC1) ramdac running T2/Linux.
> Defines re-used from xf86-video-sunffb.
> ---
> diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
> index 34b6abff9493..8d77f102dd82 100644
> --- a/drivers/video/fbdev/ffb.c
> +++ b/drivers/video/fbdev/ffb.c
> @@ -335,6 +335,9 @@ struct ffb_dac {
> };
>
> #define FFB_DAC_UCTRL 0x1001 /* User Control */
> +#define FFB_DAC_UCTRL_OVENAB 0x00000008 /* Overlay Enable */
> +#define FFB_DAC_UCTRL_WMODE 0x00000030 /* Window Mode */
> +#define FFB_DAC_UCTRL_WM_COMB 0x00000000 /* Window Mode = Combined */
> #define FFB_DAC_UCTRL_MANREV 0x00000f00 /* 4-bit Manufacturing Revision */
> #define FFB_DAC_UCTRL_MANREV_SHIFT 8
> #define FFB_DAC_TGEN 0x6000 /* Timing Generator */
> @@ -425,7 +428,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
> {
> struct ffb_fbc __iomem *fbc = par->fbc;
> struct ffb_dac __iomem *dac = par->dac;
> - unsigned long flags;
> + unsigned long flags, uctrl;
>
> spin_lock_irqsave(&par->lock, flags);
> FFBWait(par);
> @@ -442,7 +445,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
> upa_writel(par->bg_cache, &fbc->bg);
> FFBWait(par);
>
> - /* Disable cursor. */
> + /* Disable cursor. */
> upa_writel(FFB_DAC_CUR_CTRL, &dac->type2);
> if (par->flags & FFB_FLAG_INVCURSOR)
> upa_writel(0, &dac->value2);
> @@ -450,6 +453,15 @@ static void ffb_switch_from_graph(struct ffb_par *par)
> upa_writel((FFB_DAC_CUR_CTRL_P0 |
> FFB_DAC_CUR_CTRL_P1), &dac->value2);
>
> + /* Disable overlay and window modes. */
> + upa_writel(FFB_DAC_UCTRL, &dac->type);
> + uctrl = upa_readl(&dac->value);
> + uctrl &= ~FFB_DAC_UCTRL_WMODE;
> + uctrl |= FFB_DAC_UCTRL_WM_COMB;
> + uctrl &= ~FFB_DAC_UCTRL_OVENAB;
> + upa_writel(FFB_DAC_UCTRL, &dac->type);
> + upa_writel(uctrl, &dac->value);
> +
> spin_unlock_irqrestore(&par->lock, flags);
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] fbdev/ffb: fix corrupted video output on FFB1
2026-02-06 10:12 ` Helge Deller
@ 2026-02-06 10:30 ` René Rebe
2026-02-06 10:40 ` René Rebe
2026-02-06 10:41 ` Helge Deller
0 siblings, 2 replies; 5+ messages in thread
From: René Rebe @ 2026-02-06 10:30 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-fbdev
Hi,
> On 6. Feb 2026, at 11:12, Helge Deller <deller@gmx.de> wrote:
>
> Hello Rene,
>
> On 2/5/26 16:49, René Rebe wrote:
>> Fix Sun FFB1 corrupted video out [1] by disabling overlay and
>> initializing window mode to a known state. The issue never appeared on
>> my FFB2+/vertical nor Elite3D/M6. It could also depend on the PROM
>> version.
>> /SUNW,ffb@1e,0: FFB at 000001fc00000000, type 11, DAC pnum[236c] rev[10] manuf_rev[4]
>> X (II) /dev/fb0: Detected FFB1, Z-buffer, Single-buffered.
>> X (II) /dev/fb0: BT9068 (PAC1) ramdac detected (with normal cursor control)
>> X (II) /dev/fb0: Detected Creator/Creator3D
>> [1] https://www.instagram.com/p/DUTcSmSjSem/
>
> The patch itself seems ok.
> But could you please link to a freely accessible website instead of Instagram?
> I and many others don't have (and don't want) an instagram account, so
> the link is not very useful.
Well it is more free than accessing Linux Foundation training material ;-)
It was only for illustration purposes if someone wanted to see or follow random
daily development fun and not that important. Should I resend it w/o it?
Thanks!
René
> Helge
>
>> Signed-off-by: René Rebe <rene@exactco.de>
>> Cc: stable@kernel.org
>> ---
>> Tested on Sun Ultra 2 w/ FFB1 BT9068 (PAC1) ramdac running T2/Linux.
>> Defines re-used from xf86-video-sunffb.
>> ---
>> diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
>> index 34b6abff9493..8d77f102dd82 100644
>> --- a/drivers/video/fbdev/ffb.c
>> +++ b/drivers/video/fbdev/ffb.c
>> @@ -335,6 +335,9 @@ struct ffb_dac {
>> };
>> #define FFB_DAC_UCTRL 0x1001 /* User Control */
>> +#define FFB_DAC_UCTRL_OVENAB 0x00000008 /* Overlay Enable */
>> +#define FFB_DAC_UCTRL_WMODE 0x00000030 /* Window Mode */
>> +#define FFB_DAC_UCTRL_WM_COMB 0x00000000 /* Window Mode = Combined */
>> #define FFB_DAC_UCTRL_MANREV 0x00000f00 /* 4-bit Manufacturing Revision */
>> #define FFB_DAC_UCTRL_MANREV_SHIFT 8
>> #define FFB_DAC_TGEN 0x6000 /* Timing Generator */
>> @@ -425,7 +428,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
>> {
>> struct ffb_fbc __iomem *fbc = par->fbc;
>> struct ffb_dac __iomem *dac = par->dac;
>> - unsigned long flags;
>> + unsigned long flags, uctrl;
>> spin_lock_irqsave(&par->lock, flags);
>> FFBWait(par);
>> @@ -442,7 +445,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
>> upa_writel(par->bg_cache, &fbc->bg);
>> FFBWait(par);
>> - /* Disable cursor. */
>> + /* Disable cursor. */
>> upa_writel(FFB_DAC_CUR_CTRL, &dac->type2);
>> if (par->flags & FFB_FLAG_INVCURSOR)
>> upa_writel(0, &dac->value2);
>> @@ -450,6 +453,15 @@ static void ffb_switch_from_graph(struct ffb_par *par)
>> upa_writel((FFB_DAC_CUR_CTRL_P0 |
>> FFB_DAC_CUR_CTRL_P1), &dac->value2);
>> + /* Disable overlay and window modes. */
>> + upa_writel(FFB_DAC_UCTRL, &dac->type);
>> + uctrl = upa_readl(&dac->value);
>> + uctrl &= ~FFB_DAC_UCTRL_WMODE;
>> + uctrl |= FFB_DAC_UCTRL_WM_COMB;
>> + uctrl &= ~FFB_DAC_UCTRL_OVENAB;
>> + upa_writel(FFB_DAC_UCTRL, &dac->type);
>> + upa_writel(uctrl, &dac->value);
>> +
>> spin_unlock_irqrestore(&par->lock, flags);
>> }
>>
>
--
https://exactco.de • https://t2linux.com • https://patreon.com/renerebe
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] fbdev/ffb: fix corrupted video output on FFB1
2026-02-06 10:30 ` René Rebe
@ 2026-02-06 10:40 ` René Rebe
2026-02-06 10:41 ` Helge Deller
1 sibling, 0 replies; 5+ messages in thread
From: René Rebe @ 2026-02-06 10:40 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-fbdev
Hello again,
> On 6. Feb 2026, at 11:30, René Rebe <rene@exactco.de> wrote:
>
> Hi,
>
>> On 6. Feb 2026, at 11:12, Helge Deller <deller@gmx.de> wrote:
>>
>> Hello Rene,
>>
>> On 2/5/26 16:49, René Rebe wrote:
>>> Fix Sun FFB1 corrupted video out [1] by disabling overlay and
>>> initializing window mode to a known state. The issue never appeared on
>>> my FFB2+/vertical nor Elite3D/M6. It could also depend on the PROM
>>> version.
>>> /SUNW,ffb@1e,0: FFB at 000001fc00000000, type 11, DAC pnum[236c] rev[10] manuf_rev[4]
>>> X (II) /dev/fb0: Detected FFB1, Z-buffer, Single-buffered.
>>> X (II) /dev/fb0: BT9068 (PAC1) ramdac detected (with normal cursor control)
>>> X (II) /dev/fb0: Detected Creator/Creator3D
>>> [1] https://www.instagram.com/p/DUTcSmSjSem/
>>
>> The patch itself seems ok.
>> But could you please link to a freely accessible website instead of Instagram?
>> I and many others don't have (and don't want) an instagram account, so
>> the link is not very useful.
>
> Well it is more free than accessing Linux Foundation training material ;-)
> It was only for illustration purposes if someone wanted to see or follow random
> daily development fun and not that important. Should I resend it w/o it?
While I try to influence next gen to get into OpenSource and low level programming,
how about Mastodon links?
https://chaos.social/@ReneRebe/116023241660154102
Do you want to edit the patch or should I send a V2?
René
> Thanks!
> René
>
>> Helge
>>
>>> Signed-off-by: René Rebe <rene@exactco.de>
>>> Cc: stable@kernel.org
>>> ---
>>> Tested on Sun Ultra 2 w/ FFB1 BT9068 (PAC1) ramdac running T2/Linux.
>>> Defines re-used from xf86-video-sunffb.
>>> ---
>>> diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
>>> index 34b6abff9493..8d77f102dd82 100644
>>> --- a/drivers/video/fbdev/ffb.c
>>> +++ b/drivers/video/fbdev/ffb.c
>>> @@ -335,6 +335,9 @@ struct ffb_dac {
>>> };
>>> #define FFB_DAC_UCTRL 0x1001 /* User Control */
>>> +#define FFB_DAC_UCTRL_OVENAB 0x00000008 /* Overlay Enable */
>>> +#define FFB_DAC_UCTRL_WMODE 0x00000030 /* Window Mode */
>>> +#define FFB_DAC_UCTRL_WM_COMB 0x00000000 /* Window Mode = Combined */
>>> #define FFB_DAC_UCTRL_MANREV 0x00000f00 /* 4-bit Manufacturing Revision */
>>> #define FFB_DAC_UCTRL_MANREV_SHIFT 8
>>> #define FFB_DAC_TGEN 0x6000 /* Timing Generator */
>>> @@ -425,7 +428,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
>>> {
>>> struct ffb_fbc __iomem *fbc = par->fbc;
>>> struct ffb_dac __iomem *dac = par->dac;
>>> - unsigned long flags;
>>> + unsigned long flags, uctrl;
>>> spin_lock_irqsave(&par->lock, flags);
>>> FFBWait(par);
>>> @@ -442,7 +445,7 @@ static void ffb_switch_from_graph(struct ffb_par *par)
>>> upa_writel(par->bg_cache, &fbc->bg);
>>> FFBWait(par);
>>> - /* Disable cursor. */
>>> + /* Disable cursor. */
>>> upa_writel(FFB_DAC_CUR_CTRL, &dac->type2);
>>> if (par->flags & FFB_FLAG_INVCURSOR)
>>> upa_writel(0, &dac->value2);
>>> @@ -450,6 +453,15 @@ static void ffb_switch_from_graph(struct ffb_par *par)
>>> upa_writel((FFB_DAC_CUR_CTRL_P0 |
>>> FFB_DAC_CUR_CTRL_P1), &dac->value2);
>>> + /* Disable overlay and window modes. */
>>> + upa_writel(FFB_DAC_UCTRL, &dac->type);
>>> + uctrl = upa_readl(&dac->value);
>>> + uctrl &= ~FFB_DAC_UCTRL_WMODE;
>>> + uctrl |= FFB_DAC_UCTRL_WM_COMB;
>>> + uctrl &= ~FFB_DAC_UCTRL_OVENAB;
>>> + upa_writel(FFB_DAC_UCTRL, &dac->type);
>>> + upa_writel(uctrl, &dac->value);
>>> +
>>> spin_unlock_irqrestore(&par->lock, flags);
>>> }
>>>
>>
>
> --
> https://exactco.de • https://t2linux.com • https://patreon.com/renerebe
>
--
https://exactco.de • https://t2linux.com • https://patreon.com/renerebe
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] fbdev/ffb: fix corrupted video output on FFB1
2026-02-06 10:30 ` René Rebe
2026-02-06 10:40 ` René Rebe
@ 2026-02-06 10:41 ` Helge Deller
1 sibling, 0 replies; 5+ messages in thread
From: Helge Deller @ 2026-02-06 10:41 UTC (permalink / raw)
To: René Rebe; +Cc: linux-fbdev
On 2/6/26 11:30, René Rebe wrote:
>> On 6. Feb 2026, at 11:12, Helge Deller <deller@gmx.de> wrote:
>>
>> Hello Rene,
>>
>> On 2/5/26 16:49, René Rebe wrote:
>>> Fix Sun FFB1 corrupted video out [1] by disabling overlay and
>>> initializing window mode to a known state. The issue never appeared on
>>> my FFB2+/vertical nor Elite3D/M6. It could also depend on the PROM
>>> version.
>>> /SUNW,ffb@1e,0: FFB at 000001fc00000000, type 11, DAC pnum[236c] rev[10] manuf_rev[4]
>>> X (II) /dev/fb0: Detected FFB1, Z-buffer, Single-buffered.
>>> X (II) /dev/fb0: BT9068 (PAC1) ramdac detected (with normal cursor control)
>>> X (II) /dev/fb0: Detected Creator/Creator3D
>>> [1] https://www.instagram.com/p/DUTcSmSjSem/
>>
>> The patch itself seems ok.
>> But could you please link to a freely accessible website instead of Instagram?
>> I and many others don't have (and don't want) an instagram account, so
>> the link is not very useful.
>
> Well it is more free than accessing Linux Foundation training material ;-)
> It was only for illustration purposes if someone wanted to see or follow random
> daily development fun and not that important. Should I resend it w/o it?
No need to resend.
I asked, because I don't know what's visible there, and maybe you
had another link which could have been used instead.
It seems that's not the case, so I'll take the patch as-is.
applied to fbdev git tree.
Thanks!
Helge
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-06 10:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 15:49 [PATCH] fbdev/ffb: fix corrupted video output on FFB1 René Rebe
2026-02-06 10:12 ` Helge Deller
2026-02-06 10:30 ` René Rebe
2026-02-06 10:40 ` René Rebe
2026-02-06 10:41 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox