Commit Graph

421 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult abaf937693 fb: drop obsolete FbLaneCase*() macros
They haven't been used for over a decade now, so no need to keem'em any longer.
(note: xf86-video-intel has it's own copy of them)
2025-06-12 16:39:43 +02:00
Enrico Weigelt, metux IT consult 5504bc42ae fb: drop obsolete FbMaskStip macro
Hasn't been used since 24bpp support was dropped, almost a decade ago.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:39:41 +02:00
Enrico Weigelt, metux IT consult db2568b834 fb: drop obsolete fbFillPolygon define
Hasn't been used since XAA removal, back 17 years ago. Probably just had been
forgotten to clean up.

See: 703a9645f3
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:39:38 +02:00
Enrico Weigelt, metux IT consult 7f835330a4 fb: drop FbRotStipLeft, FbRotRight, FbRotStipRight macros
Not used anywhere, so can be dropped. Doesn't seem to be ever used
since added over two decades ago.

See: 9508a382f8
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:39:35 +02:00
Enrico Weigelt, metux IT consult badafca022 fb: drop commented-out FbLeftBits and FbLeftBits macros
Not used anywhere, so can be dropped. They always have been commented-out
since added over two decades ago.

See: 9508a382f8

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:39:32 +02:00
Enrico Weigelt, metux IT consult c3fe57f095 fb: drop obsolete FB_STIP_ODDSTRIDE and FB_STIP_ODDPTR macro()
Those haven't been used for over a decade now, so no need to keep
it around any longer.

See: a198373685

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:39:29 +02:00
Enrico Weigelt, metux IT consult a5f8524d69 fb: overlay: drop unused fbOverlaySetupScreen()
Not used anywhere, neither internal nor drivers, so no need to keep
it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:36:17 +02:00
Enrico Weigelt, metux IT consult 652d350c25 fb: overlay: make fbOverlayWindowExposures() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:36:12 +02:00
Enrico Weigelt, metux IT consult f5d0c64e8d fb: overlay: make fbOverlayCopyWindow() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:36:09 +02:00
Enrico Weigelt, metux IT consult 47269bf935 fb: overlay: make fbOverlayUpdateLayerRegion() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:36:04 +02:00
Enrico Weigelt, metux IT consult b399cf2fe1 fb: overlay: make fbOverlayPaintKey() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:36:02 +02:00
Enrico Weigelt, metux IT consult 097cbc3def fb: overlay: make fbOverlayCreateScreenResources() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:58 +02:00
Enrico Weigelt, metux IT consult 4a1850a3a9 fb: overlay: make fbOverlayWindowLayer() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:56 +02:00
Enrico Weigelt, metux IT consult ae4aa34456 fb: overlay: make fbOverlayCloseScreen() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:53 +02:00
Enrico Weigelt, metux IT consult 1d579528ef fb: overlay: make fbOverlayCreateWindow() static
Not used anywhere outside fboverlay.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:50 +02:00
Enrico Weigelt, metux IT consult 63097cb5c9 fb: pict: make fbGlyphs() static
Not used anywhere outside fbpict.c, so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:29 +02:00
Enrico Weigelt, metux IT consult b0e7326f6d fb: pict: unexport fbTriangles()
Not used by drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:19 +02:00
Enrico Weigelt, metux IT consult 12cb13d1fa fb: pict: unexport fbTrapezoids()
Not used by drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:17 +02:00
Enrico Weigelt, metux IT consult 587fd5c708 fb: pict: unexport fbAddTriangles()
Not used by drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:14 +02:00
Enrico Weigelt, metux IT consult 02e61f15a9 fb: pict: unexport fbRasterizeTrapezoid()
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:35:11 +02:00
Enrico Weigelt, metux IT consult 08ec122fa7 fb: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.

See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
2025-02-12 17:48:30 +01:00
Enrico Weigelt, metux IT consult c3c538784a mi: unexport miExpandDirectColors()
Not used by any drivers/modules, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1727>
2025-02-06 16:45:20 +02:00
Enrico Weigelt, metux IT consult e424f49cdb mi: unexport miWindowExposures()
Not used by any modules/drivers, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1727>
2025-02-06 16:45:20 +02:00
Sérgio Basto 4cd7e2e819 Revert "fb: Declare wfbFinishScreenInit, wfbScreenInit for !FB_ACCESS_WRAPPER"
This reverts commit 34a430a16e

Signed-off-by: Sérgio M. Basto <sergio@serjux.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1720>
2024-11-08 17:42:09 +00:00
Enrico Weigelt, metux IT consult 1642adec3b dix: unexport Ones()
It's not used by any module/driver, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1695>
2024-10-26 16:35:57 +00:00
Enrico Weigelt, metux IT consult a917f6a8a8 drop obsolete HAVE_DIX_CONFIG_H
The symbol controls whether to include dix-config.h, and it's always set,
thus we don't need it (and dozens of ifdef's) anymore.

This commit only removes them from our own source files, where we can
guarantee that dix-config.h is present - leaving the (potentially exported)
headers untouched.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-10-10 13:38:31 +00:00
Enrico Weigelt, metux IT consult b48e4a9cb7 dix: unexport AllocColor()
Not used by any driver/module, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>
2024-09-01 22:06:49 +00:00
Enrico Weigelt, metux IT consult 368055d3f1 render: move private definitions out of public glyphstr.h
Public module API headers don't need / shouldn't to contain anything that
isn't part of the API (non-exported functions, etc).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1287>
2024-03-03 22:54:16 +00:00
Izumi Tsutsui f2b019d2b3 fb: Fix 1bpp Xservers on "whitePixel=0, blackPixel=1" VRAMs
Closes: #1057
2024-01-03 19:43:16 +00:00
Izumi Tsutsui 7b1758936b Revert "fb: Remove even/odd tile slow-pathing"
This reverts commit e572bcc7f4.

Closes: #1056
2023-04-19 15:33:59 +00:00
Florian Weimer 34a430a16e fb: Declare wfbFinishScreenInit, wfbScreenInit for !FB_ACCESS_WRAPPER
xf86-video-nouveau calls wfbScreenInit without defining
FB_ACCESS_WRAPPER (which has other unintended side effects).
Presently, this compiles and links because compilers still support
implicit function declarations, but this is going to change fairly
soon.  This seems to be the most straightforward change to keep
the driver building.
2023-04-19 15:27:26 +00:00
Alan Coopersmith d6b20f5e36 Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25 09:40:41 -08:00
Jeremy Huddleston Sequoia 16e7cdba48 rootless: Use screen_x and screen_y instead of pixmap pointer hacks
This updates rootless to treat pixmaps consistently with COMPOSITE,
using the screen_x and screen_y values rather than doing hacky math.

This will allow for proper bounds checking on a given PixmapRec.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2023-01-20 17:10:54 +00:00
Povilas Kanapickas c97397dc47 Remove autotools support
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-10-27 13:15:40 +03:00
Jan Beich 376eaadde3 meson: hide C API if Xorg is disabled (like autotools)
When building only Xwayland using Meson some files are always installed.
This causes package conflict if Xwayland is built separately from Xorg.

  include/xorg/compositeext.h
  include/xorg/damage.h
  include/xorg/damagestr.h
  include/xorg/dbestruct.h
  include/xorg/dri3.h
  include/xorg/fb.h
  include/xorg/fboverlay.h
  include/xorg/fbpict.h
  include/xorg/fbrop.h
  include/xorg/geext.h
  include/xorg/geint.h
  include/xorg/glyphstr.h
  include/xorg/mi.h
  include/xorg/micmap.h
  include/xorg/micoord.h
  include/xorg/migc.h
  include/xorg/miline.h
  include/xorg/mioverlay.h
  include/xorg/mipict.h
  include/xorg/mipointer.h
  include/xorg/mipointrst.h
  include/xorg/mistruct.h
  include/xorg/misync.h
  include/xorg/misyncfd.h
  include/xorg/misyncshm.h
  include/xorg/misyncstr.h
  include/xorg/mizerarc.h
  include/xorg/panoramiX.h
  include/xorg/panoramiXsrv.h
  include/xorg/picture.h
  include/xorg/picturestr.h
  include/xorg/present.h
  include/xorg/presentext.h
  include/xorg/randrstr.h
  include/xorg/rrtransform.h
  include/xorg/shadow.h
  include/xorg/shmint.h
  include/xorg/syncsdk.h
  include/xorg/vndserver.h
  include/xorg/wfbrename.h
  include/xorg/xace.h
  include/xorg/xacestr.h
  include/xorg/xorg-server.h
  include/xorg/xvdix.h
  include/xorg/xvmcext.h
  share/aclocal/xorg-server.m4

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2021-03-11 00:22:36 +00:00
Dave Airlie ea47af87f6 xserver/output: rename some badly named variables/APIs.
This is an API and ABI break

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-10 06:17:44 +10:00
Alan Coopersmith 23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
Dave Airlie c7fa6a0a0d fboverlay: move bpp checks above malloc
Avoids having to free the malloced object.

Pointed out by coverity.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12 12:26:48 +10:00
Thierry Reding 88c7b8bf4b meson: Distribute more SDK headers
Install missing headers to the SDK directory to allow external modules
to properly build against the SDK. After this commit, the list of files
installed in the SDK include directory is the same as the list of files
installed by the autotools-based build.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-02 13:42:08 -04:00
Adam Jackson 8171d4c2d6 render: Store and use all 16bpc of precision for solid pixels (v2.1)
This plumbs the full width color for solid pictures through to fb, exa,
and glamor. External drivers and acceleration code may wish to make a
similar change for sufficiently new servers.

v2: Don't break ABI (Michel Dänzer)
v2.1: Use the (correct) full color in fb too (Michel Dänzer)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-26 16:46:34 -05:00
Adam Jackson a49379b604 fb: Check whether the window is enabled directly
... instead of its root window. Xwayland's rootless mode empties the
root window border clip since its root window has no storage, but
redirected windows (the only kind it can show) will have a non-empty
border clip anyway, cf. the #ifdef COMPOSITE in miComputeClips. With
this change, non-glamor Xwayland's GetImage actually works.

Other acceleration layers may need to change to account for this, but
this appears to be safe for the existing open source drivers. Only the
xfree86 DDX has any problem with losing its framebuffer on VT switch,
and even then only for UMS drivers (which excludes glamor, uxa, and sna
from consideration). This leaves exa, which already contains code to
evict pixmaps to host memory on VT switch. Since the xfree86 core will
still empty the root clip on VT switch, while the root window itself may
not contain a valid image we won't try to touch it, but GetImage from a
redirected window will now work even when switched away.

Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-09-13 11:10:56 -04:00
Peter Hutterer bf3a591fdc fb: remove some superfluous empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-29 13:52:55 +10:00
Adam Jackson 6413a87bcd meson: Build libwfb.so
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-27 15:19:36 -04:00
Eric Anholt 1549e30372 Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far.  The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet.  The unit tests are also not done.

The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools.  meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.

v2: Fix indentation nits, move version declaration to project(), use
    existing meson_options for version-config.h's vendor name/web.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 15:25:27 -07:00
Adam Jackson 4aa35c46da fb: Handle ZPixmap planemask in GetImage the other way around
Formerly we'd zero the image data and then pull out a plane at a time.
It's faster to apply the planemask after the fact, since that turns the
GetImage into a memcpy:

  100000.0  101000.0 (1.010) (copy 0xaaaaaaaa) ShmGetImage 10x10 square
   42400.0   59400.0 (1.401) (copy 0xaaaaaaaa) ShmGetImage 100x100 square
    3040.0    5280.0 (1.737) (copy 0xaaaaaaaa) ShmGetImage 500x500 square
   96100.0   95200.0 (0.991) (0xaaaaaaaa) GetImage 10x10 square
   29600.0   36800.0 (1.243) (0xaaaaaaaa) GetImage 100x100 square
    1850.0    2620.0 (1.416) (0xaaaaaaaa) GetImage 500x500 square

Measured with Xvfb at depth 24 on Skylake i7-6560U.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-20 13:47:49 -04:00
Adam Jackson 0803918e64 fb: Remove 24bpp support (v3)
v2:
- Require power-of-two bpp in ScreenInit
- Eliminate fbCreatePixmapBpp

v3
- Squash in the exa and glamor changes so we can remove pRotatedPixmap
  in the same stroke.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-17 15:14:42 -04:00
Adam Jackson e161853f38 fb: Remove stray references to fbHasVisualTypes
Removed in 84e8de12.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-02-16 15:10:30 -05:00
Adam Jackson 4c7d229582 fb: Remove unused fbGetFreeCompClip macro
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-02-16 15:10:28 -05:00
Adam Jackson 706e6d9cd0 wfb: Hide init function decls behind FB_ACCESS_WRAPPER
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-02-16 15:10:24 -05:00
Adam Jackson 790c1c0b10 wfb: Add missing rename for fbGlyphs
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-02-16 15:10:12 -05:00