Dave Airlie <[email protected]> writes: > From: Dave Airlie <[email protected]> > > This adds support using glamor for background None. > > loosely based off the amdgpu code. relies on the > glamor_finish code. > > Signed-off-by: Dave Airlie <[email protected]> > --- > hw/xfree86/drivers/modesetting/driver.c | 21 +++++ > hw/xfree86/drivers/modesetting/driver.h | 2 +- > hw/xfree86/drivers/modesetting/drmmode_display.c | 102 > +++++++++++++++++------ > hw/xfree86/drivers/modesetting/drmmode_display.h | 4 +- > 4 files changed, 103 insertions(+), 26 deletions(-) > > diff --git a/hw/xfree86/drivers/modesetting/driver.c > b/hw/xfree86/drivers/modesetting/driver.c > index 8f60eae..3895aca 100644 > --- a/hw/xfree86/drivers/modesetting/driver.c > +++ b/hw/xfree86/drivers/modesetting/driver.c > @@ -1099,6 +1099,22 @@ SetMaster(ScrnInfoPtr pScrn) > } >
I would have expected the copy to be in CreateScreenResources, but I'm
probably just missing something about the fine init sequence.
It's also a bit unfortunate that we have to glamor_finish immediately
after the copy so that we don't modeset to a not-yet-finished pixmap,
since we're delaying the modeset until later anyway. I think that's a
limitation of our non-pageflip modesetting API, though.
Still, if this is how other drivers have been doing this, it's fine with
me.
It would be nice to give this the comment from another driver:
/* When the root window is created, initialize the screen contents from
* console if -background none was specified on the command line
*/
which explains a bit why this weird thing is stuffed in CreateWindow.
> static Bool
> +CreateWindow_oneshot(WindowPtr pWin)
> +{
> + ScreenPtr pScreen = pWin->drawable.pScreen;
> + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
> + modesettingPtr ms = modesettingPTR(pScrn);
> + Bool ret;
> +
> + pScreen->CreateWindow = ms->CreateWindow;
> + ret = pScreen->CreateWindow(pWin);
> +
> + if (ret)
> + drmmode_copy_fb(pScrn, &ms->drmmode);
> + return ret;
> +}
> +
With that,
Acked-by: Eric Anholt <[email protected]>
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
