All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: Helge Deller <deller@gmx.de>
Cc: qemu-stable@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 5/5] hw/display/artist: Fix framebuffer access for Linux
Date: Sat, 15 Jan 2022 19:36:41 +0100	[thread overview]
Message-ID: <87o84cn8w6.fsf@x1.stackframe.org> (raw)
In-Reply-To: <87wnj1mcx0.fsf@x1.stackframe.org> (Sven Schnelle's message of "Sat, 15 Jan 2022 12:55:07 +0100")

Sven Schnelle <svens@stackframe.org> writes:

> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>
>> +Sven
>>
>> On 12/1/22 22:07, Helge Deller wrote:
>>> This patch fixes two problems which prevented Linux to access the
>>> artist graphics framebuffer:
>>> The check if the framebuffer or the color map should be accessed was
>>> incomplete. By using the vram_read/write_bufidx() functions we now check
>>> correctly if ARTIST_BUFFER_CMAP should be accessed.
>>> The second fix is to correctly calculate the X- and Y-coordinates
>>> and
>>> check against the graphics resolution.
>>> With this fix in place, the Linux stifb driver now works correctly,
>>> shows the penguins at bootup and uses the stifb as graphics console.
>>
>> Cool, could you add a test similar to these?
>>
>> $ git grep Tux tests/avocado/
>> tests/avocado/machine_arm_integratorcp.py:69:        Boot Linux and
>> verify the Tux logo is displayed on the framebuffer.
>> tests/avocado/machine_mips_malta.py:44:        Boot Linux kernel and
>> check Tux logo is displayed on the framebuffer.
>>
>>> I haven't seen any negative side effects when running HP-UX.
>

> Hmm, the patch below  breaks hp-ux 10.20 for me, please see the
> attached screenshot.

I think my initial thought that the register 118000 is the buffer access
mode for the color map is just wrong. I think it's setting the SRC & DST
buffer access mode at the same time because on the Visualize FX cards
we have similar registers:

#define B2_FBC_BABoth                     0x00920804 /* DBA & SBA (reads return DBA) (RW) */
#define B2_FBC_DBA                        0x00920808 /* Destination Bitmap Access Register (RW) */
#define B2_FBC_SBA                        0x0092080C /* Source Bitmap Access Register (RW) */

Looking at Artist, we have:

CMAP_BM_ACCESS = 0x118000
DST_BM_ACCESS = 0x118004
SRC_BM_ACCESS = 0x118008

Given that artist and visualize fx are very similar when it comes to 2D
acceleration, i think CMAP_BM_ACCESS is just changing both registers,
completely unrelated to the color map. I tried changing the code, but
of course that breaks a lot of things. Let me see whether i can make
that work.

/Sven


      reply	other threads:[~2022-01-15 18:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 21:07 [PATCH 0/5] Fixes and updates for hppa target Helge Deller
2022-01-12 21:07 ` [PATCH 1/5] seabios-hppa: Update SeaBIOS-hppa to VERSION 3 Helge Deller
2022-01-12 21:07 ` [PATCH 2/5] hw/hppa: Allow up to 16 emulated CPUs Helge Deller
2022-01-12 21:07 ` [PATCH 3/5] hppa: Add support for an emulated TOC/NMI button Helge Deller
2022-01-12 21:07 ` [PATCH 4/5] hw/display/artist: Mouse cursor fixes for HP-UX Helge Deller
2022-01-12 21:07 ` [PATCH 5/5] hw/display/artist: Fix framebuffer access for Linux Helge Deller
2022-01-12 21:47   ` Philippe Mathieu-Daudé
2022-01-15 11:55     ` Sven Schnelle
2022-01-15 18:36       ` Sven Schnelle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o84cn8w6.fsf@x1.stackframe.org \
    --to=svens@stackframe.org \
    --cc=deller@gmx.de \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.