The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "René Rebe" <rene@exactco.de>
Cc: tpearson@raptorengineering.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, airlied@redhat.com
Subject: Re: [PATCH] drm/ast: Fix big-endian support
Date: Mon, 15 Dec 2025 08:27:56 +0100	[thread overview]
Message-ID: <48b1bcea-05ff-469c-95d8-de094e68b4fc@suse.de> (raw)
In-Reply-To: <20251212.211558.488710050851597114.rene@exactco.de>

Hi

Am 12.12.25 um 21:15 schrieb René Rebe:
> Hi,
>
> On Thu, 11 Dec 2025 15:31:01 +0100 (CET), René Rebe <rene@exactco.de> wrote:
>
>>>   	/* write checksum + signature */
>>> +	writel(swab32(csum), dst);
>>> +	writel(swab32(width), dst + AST_HWC_SIGNATURE_SizeX);
>>> +	writel(swab32(height), dst + AST_HWC_SIGNATURE_SizeY);
>>> +	writel(swab32(0), dst + AST_HWC_SIGNATURE_HOTSPOTX);
>>> +	writel(swab32(0), dst + AST_HWC_SIGNATURE_HOTSPOTY);
>>> +#else
>>> +	memcpy_toio(dst, src, AST_HWC_SIZE);
>>>   	dst += AST_HWC_SIZE;
>>> +
>>> +	/* write checksum + signature */
>>>   	writel(csum, dst);
>>>   	writel(width, dst + AST_HWC_SIGNATURE_SizeX);
>>>   	writel(height, dst + AST_HWC_SIGNATURE_SizeY);
>>>   	writel(0, dst + AST_HWC_SIGNATURE_HOTSPOTX);
>>>   	writel(0, dst + AST_HWC_SIGNATURE_HOTSPOTY);
>>> +#endif
>> I'm pretty sure this will break the cursor, as the position was
>> working correctly and I only had to swap the cursor image data. The
>> csum will also not be identical anyway, as the checksum function
>> computes it in native byte order. Theoretically that would have to be
>> changed. However, I do not see where it is really used, maybe only
>> some special remote desktop vendor protocol that I'm not using. Maybe
>> the exact checksum does not even matter and is only used as
>> optimization to not resend an unchanged cursor image.
>>
>> I'll send a final version after validating it w/ HW later.
> I just sent a more minimally tested V4 removing the superflous unused
> fmt_cnv_state to ast_set_cursor_image you somehow had added.

That is a leftover form earlier drm_fb_swab() code.

>
> As the additional writen cursor RDP service writes are untested, I
> left them out.
>
> There is still something suspect or buggy: the 2-bit X11 cursor is
> filled with transparency, while the ARGB RGB channel work now. Modern
> ARGB Xcursor theme also look strange. Not sure if that is just due to
> loosing 4-bit precision and thus half of the dynamic range with all
> the shadows. To me at least the 2-bit transparent X cursor looks like
> a fmt conversion bug in some layer that we would need to continue
> debugging another day. At least the framebuffer / installer text would
> be more readble upstream now, too ;-)

The kernel's ast driver doesn't support 2-bit cursors. It's likely a 
problem somewhere in Xorg or the rendering libraries.

Best regards
Thomas

>
> Thanks,
> 	René
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



      reply	other threads:[~2025-12-15  7:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 16:06 [PATCH] drm/ast: Fix big-endian support René Rebe
2025-12-03  9:40 ` Thomas Zimmermann
2025-12-03 10:14   ` René Rebe
2025-12-03 10:28     ` Thomas Zimmermann
2025-12-05 15:14   ` René Rebe
2025-12-05 18:31     ` Timothy Pearson
2025-12-05 19:46       ` Thomas Zimmermann
2025-12-05 19:50         ` René Rebe
2025-12-08  8:44           ` Thomas Zimmermann
2025-12-09 12:13             ` René Rebe
2025-12-10  8:55               ` Thomas Zimmermann
2025-12-10 15:33                 ` René Rebe
2025-12-10 15:41                   ` Thomas Zimmermann
2025-12-10 16:56                     ` René Rebe
2025-12-11  7:22                       ` Thomas Zimmermann
2025-12-11 12:43                         ` René Rebe
2025-12-11 14:03                           ` Thomas Zimmermann
2025-12-11 14:31                             ` René Rebe
2025-12-11 14:56                               ` Thomas Zimmermann
2025-12-12 15:14                                 ` Michel Dänzer
2025-12-12 17:54                                   ` René Rebe
2025-12-12 20:15                               ` René Rebe
2025-12-15  7:27                                 ` Thomas Zimmermann [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=48b1bcea-05ff-469c-95d8-de094e68b4fc@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene@exactco.de \
    --cc=tpearson@raptorengineering.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox