From: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: Removal of Non-KMS support
Date: Wed, 06 Jan 2010 21:59:04 +0100 [thread overview]
Message-ID: <87iqbfhrvr.fsf@riseup.net> (raw)
In-Reply-To: <1262755950.2346.5.camel@araqiel> (Ben Skeggs's message of "Wed, 06 Jan 2010 15:32:30 +1000")
[-- Attachment #1.1.1: Type: text/plain, Size: 4101 bytes --]
Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> I did a very quick pass at removing all the non-KMS support from the
> DDX. It's tested on G80 but nowhere else currently, I thought some
> discussion would be a good idea rather than just ripping it out :)
>
> The non-KMS paths are messy, and lets face it, rotting badly. IMO the
> KMS code is stable enough now that we can continue without the UMS
> crutch, and indeed, the KMS code supports a lot more chipsets
> (particularly on GF8 and up) than the UMS code ever will.
>
> I've left the Xv overlay code intact, but ifdef'd out. I want to bring
> support back with KMS enabled (thinking of older chipsets where the
> blitter sucks), so it made sense to leave the old code there for now.
>
> So, who has some Signed-off-by's :)
I'm very happy that we're finally getting rid of this :), besides a few
comments, you got my blessing:
Signed-off-by: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
>
> Ben.
>
>
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
Some snips from the patch in question:
> [...]
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index e37e7c1..3d2df8d 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> [...]
> +#define SOURCE_MASK_INTERLEAVE 32
> +#define TRANSPARENT_PIXEL 0
> +
> +/*
> + * Convert a source/mask bitmap cursor to an ARGB cursor, clipping or
> + * padding as necessary. source/mask are assumed to be alternated each
> + * SOURCE_MASK_INTERLEAVE bits.
> + */
> +static void
> +nv_cursor_convert_cursor(uint32_t *src, void *dst, int src_stride,
> + int dst_stride, int bpp, uint32_t fg, uint32_t bg)
> +{
> + int width = min(src_stride, dst_stride);
> + uint32_t b, m, pxval;
> + int i, j, k;
> +
> + for (i = 0; i < width; i++) {
> + for (j = 0; j < width / SOURCE_MASK_INTERLEAVE; j++) {
> + int src_off = i*src_stride/SOURCE_MASK_INTERLEAVE + j;
> + int dst_off = i*dst_stride + j*SOURCE_MASK_INTERLEAVE;
> +
> + b = src[2*src_off];
> + m = src[2*src_off + 1];
> +
> + for (k = 0; k < SOURCE_MASK_INTERLEAVE; k++) {
> + pxval = TRANSPARENT_PIXEL;
> +#if X_BYTE_ORDER == X_BIG_ENDIAN
> + if (m & 0x80000000)
> + pxval = (b & 0x80000000) ? fg : bg;
> + b <<= 1;
> + m <<= 1;
> +#else
> + if (m & 1)
> + pxval = (b & 1) ? fg : bg;
> + b >>= 1;
> + m >>= 1;
> +#endif
> + if (bpp == 32)
> + ((uint32_t *)dst)[dst_off + k] = pxval;
> + else
> + ((uint16_t *)dst)[dst_off + k] = pxval;
> + }
> + }
> + }
> +}
> +
I'm quite sure that, without UMS, this function doesn't make sense
anymore, you could leave this fun for the X server (we can use the
load_cursor_argb hook even on the cards we don't advertise ARGB
support). As a bonus that would probably solve Craig's rotated cursor
issue.
> [...]
> diff --git a/src/nv_setup.c b/src/nv_setup.c
> deleted file mode 100644
> index f0478ca..0000000
> --- a/src/nv_setup.c
> +++ /dev/null
> [...]
> - pNv->alphaCursor = (pNv->NVArch >= 0x11);
> -
> - pNv->twoHeads = (pNv->Architecture >= NV_ARCH_10) &&
> - (implementation != CHIPSET_NV10) &&
> - (implementation != CHIPSET_NV15) &&
> - (implementation != CHIPSET_NFORCE) &&
> - (implementation != CHIPSET_NV20);
> -
> - pNv->gf4_disp_arch = pNv->twoHeads && implementation != CHIPSET_NV11;
> -
> - /* nv30 and nv35 have two stage PLLs, but use only one register; they are dealt with separately */
> - pNv->two_reg_pll = (implementation == CHIPSET_NV31) ||
> - (implementation == CHIPSET_NV36) ||
> - (pNv->Architecture >= NV_ARCH_40);
> -
> - pNv->WaitVSyncPossible = (pNv->Architecture >= NV_ARCH_10) &&
> - (implementation != CHIPSET_NV10);
> -
The accel code still has some bogus checks for WaitVSyncPossible, and
bad things will happen if it's left uninitialized. Anyway, it would be
nice to kill all this crap from NVRec.
> - pNv->BlendingPossible = ((pNv->Chipset & 0xffff) > CHIPSET_NV04);
> [...]
[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]
[-- Attachment #2: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2010-01-06 20:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 5:32 Removal of Non-KMS support Ben Skeggs
2010-01-06 20:59 ` Francisco Jerez [this message]
[not found] ` <87iqbfhrvr.fsf-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2010-01-06 22:16 ` Maarten Maathuis
[not found] ` <6d4bc9fc1001061416h39a64a13r7b2d5c4efde1f868-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-06 22:20 ` Maarten Maathuis
2010-01-06 22:20 ` Ben Skeggs
2010-01-13 21:22 ` Xavier
[not found] ` <91752841001131322s6b899029pb8dac24c2e18b1ca-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-13 22:24 ` Ben Skeggs
2010-01-06 22:58 ` Pekka Paalanen
[not found] ` <20100107005827.466c968e-cxYvVS3buNOdIgDiPM52R8c4bpwCjbIv@public.gmane.org>
2010-01-06 23:21 ` Ben Skeggs
2010-01-07 1:59 ` Robert Noland
[not found] ` <1262829587.2486.42.camel-it3iGQysvyiGwK4wanZbFg@public.gmane.org>
2010-01-07 8:56 ` Maarten Maathuis
[not found] ` <6d4bc9fc1001070056x7e9e9a04pef692dde5d5eced9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-07 10:23 ` Ben Skeggs
2010-01-07 11:45 ` Maarten Maathuis
2010-01-23 10:25 ` Porting nouveau/ttm/drm to FreeBSD/OpenSolaris "C. Bergström"
[not found] ` <4B5ACE8C.40907-Hl0AACgZOF5l57MIdRCFDg@public.gmane.org>
2010-01-23 14:20 ` Krzysztof Smiechowicz
[not found] ` <4B5B05BE.3080606-5tc4TXWwyLM@public.gmane.org>
2010-01-23 14:46 ` "C. Bergström"
2010-01-23 16:15 ` Robert Noland
2010-01-23 20:43 ` Stephane Marchesin
[not found] ` <6a89f9d51001231243o1cc0899aw4338c121e4af59b1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-23 21:33 ` "C. Bergström"
2010-01-23 21:34 ` Dave Airlie
2010-01-07 19:49 ` Removal of Non-KMS support Xavier
[not found] ` <91752841001071149u155f3e22veb91b07167f60f36-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-07 22:09 ` Ben Skeggs
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=87iqbfhrvr.fsf@riseup.net \
--to=currojerez-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.