-
OpenBSD, FreeBSD and NetBSD don't contains file byteswap.h. Used specifics of them. Fixes: 746ab3bb (sna: Added AYUV format support for textured and sprite video adapters.) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109268 CC: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by:
Sergii Romantsov <sergii.romantsov@globallogic.com>
985553df -
Chris Wilson authored
The kernel may keep the old connector id around so that userspace can gracefully switch it off, which means that on detecting a topology change (a new id for an old connector path), we must do a SetCRTC to release the old resources. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106250 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
c37c7ee0 -
The various clut handling functions like a setup consistent with the x-screen color depth. Otherwise we observe improper sampling in the gamma tables at depth 30. Therefore replace hard-coded bitsPerRGB = 8 by actual bits per channel scrn->rgbBits. Also use this for call to xf86HandleColormaps(). Tested for uxa and sna at depths 8, 16, 24 and 30 on IvyBridge, and tested at depth 24 and 30 that xgamma and gamma table animations work, and with measurement equipment to make sure identity gamma ramps actually are identity mappings at the output. v2: Also deal with X-Server 1.19 and earlier, which as of v1.19.6 lack a fix to color palette handling and can not deal with depths/bpc > 24/8 bpc. On < 1.20 we skip xf86HandleColormaps() setup at > 8 bpc. This disables color palette handling on such servers at > 8 bpc, but still keeps RandR gamma table handling intact. Tested on 1.19.6 and 1.20.0 to do the right thing. Signed-off-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
33ee0c3b -
Chris Wilson authored
In case udev_monitor_get_device() itself does not handle being interrupted, go around the loop again. Daniel Vetter discovered this interesting quirk during igt testing of kms_leases. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
3a2dec17 -
Presumably this only matters for i686 because amd64 implies sse2, but: BUILDSTDERR: In file included from gen4_vertex.c:34: BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex': BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y) BUILDSTDERR: ^~~~~~~~~~~~~~ BUILDSTDERR: gen4_vertex.c:308:25: note: called from here BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */ BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX' BUILDSTDERR: OUT_VERTEX(dstX, dstY); BUILDSTDERR: ^~~~~~~~~~ The bug here appears to be that emit_vertex() is declared 'sse2' but vertex_emit_2s is merely always_inline. gcc8 decides that since you said always_inline you need to have explicitly cloned it for every permutation of targets. Merely saying inline seems to do the job of cloning vertex_emit_2s as much as necessary. So to reiterate: if you say always-inline, it won't, but if you just say maybe inline, it will. Thanks gcc, that's helpful.
9e6e003e -
Chris Wilson authored
Apparently we never take this path or else it would have failed before (we don't take it as we prefer render for these chipsets). Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
a63b6a22 -
Once we've switched to using the swcursor (possibly due to the cursor ioctl failing) we currently keep using the swcursor until the modeset. That's not particularly great as the swcursor has several issues. Apart from the (presumably expected) flicker, the cursor also tends to leave horrible trails behind around dri2/3 windows (happens with tearfree at least). To avoid some of that let's try to switch back to the hwcursor a bit sooner. We can do that neatly via the convenient swcursor block handler. v2 [ickle]: Apply the restoration after the screen update is complete. v3 [vsyrjala]: Push it back to restore_swcursor and remove the fullscreen redraw -- prevents terrible flickering in v2! References: https://bugs.freedesktop.org/show_bug.cgi?id=106935 Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
6afed33b -
Generalize the code that parses the plane properties to be useable for crtc (or any kms object) properties as well. v2: plane 'type' prop is enum not range! Cc: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
539b15bd -
Probe the GAMMA_LUT/GAMMA_LUT_SIZE props and utilize them when the running with > 8bpc. v2: s/sna_crtc_id/__sna_crtc_id/ in DBG since we have a sna_crtc v3: Fix the vg "bluered" typo (Mario) This time I even build tested with vg support Cc: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-and-tested-by:
Mario Kleiner <mario.kleiner.de@gmail.com>
60022507 -
Chris Wilson authored
Turn off the CONSTANT_BUFFER loads as we do not use them. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
bd585f62 -
Chris Wilson authored
Mixing I915_TILING_Y and the blitter is painfully slow, so we need to take use of I915_TILING_Y into more prominent consideration and even force a ring switch in case it is being used. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
95ea0564 -
Chris Wilson authored
Check for a stale backbuffer (the client didn't call DRI2GetBuffers between DRI2SwapBuffers) before asserting so that we should be more resilient with asserts enabled for client errors. References: https://bugs.freedesktop.org/show_bug.cgi?id=111197 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
364c9169 -
Chris Wilson authored
If the backbuffer is stale (i.e. the client didn't call DRI2GetBuffers before swapping) the front/back bo may not be distinct. Move the assertion for a valid swap after the handling of a stale swap so that the assertions are more robust for a client error. References: https://bugs.freedesktop.org/show_bug.cgi?id=111197 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
fffb1f52 -
Chris Wilson authored
If we change scanout status (i.e. whether or not this flip chain may be presented directly on the CRTC), throwaway the previous back buffer cache as those buffers may not be suitable for presentation. Reported-by:
Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=111197 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
6f4972d5 -
Ville Syrjälä authored
../src/sna/sna_composite.c:567:11: warning: variable ‘sx’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered] int16_t sx = src_x + tx - (dst->pDrawable->x + dst_x); ^~ etc. I had a quick look at a few of the cases and they seemed fine to me, so feels like gcc just being dense. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
e95490a7 -
Ville Syrjälä authored
Suppress more compiler warnings. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
2fae3b89 -
Ville Syrjälä authored
Avoid the compiler gettings upset about us redefining FontSetPrivate(). Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
04d8411d -
Ville Syrjälä authored
gcc doesn't like extra stuff in the fall through comments. Replace them with the standard form. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
f9f318e4 -
Ville Syrjälä authored
Sprinkle fall through comments where needed. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
8cad9980 -
Ville Syrjälä authored
Refactor the BR13 color depth setup to common helper. This eliminates a bunch of implicit fall through warns. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
1804eacc -
Ville Syrjälä authored
Duplicate a bit of code in FbDoLeftMaskByteRRop() switch statement to avoid the fall through. And while at it sort the cases based on the left byte and length. Makes the pattern matcher in my brain much happier. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
b88d9287 -
Ville Syrjälä authored
Silence the compiler warning about missing initializers by using named initializers. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
4b26ec2e -
Ville Syrjälä authored
Use an empty {} as the terminator in intel_device_match[] to avoid the warning about missing initlizers. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
696f7eda -
Ville Syrjälä authored
Avoid -Wno-missing-field-initializers by using named initializers. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
24a06fef -
Ville Syrjälä authored
../src/intel_device.c: In function ‘__intel_open_device__pci.isra.6’: ../src/intel_device.c:321:25: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=] sprintf(path + base, "%s", de->d_name); Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
17ecd906 -
Ville Syrjälä authored
../src/sna/sna_display.c: In function ‘sna_covering_crtc’: ../src/sna/sna_display.c:8235:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if (*(const uint64_t *)box == *(uint64_t *)&crtc->bounds) { Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
97ce0215 -
Ville Syrjälä authored
Just access the xGlyphInfo members directly to avoid the compiler getting upset about strict aliasing violations. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
d8a3db25 -
Ville Syrjälä authored
Replace the cast+deref with memcpy() so that we don't upset the compiler's strict aliasing rules. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
e4a8d533 -
Ville Syrjälä authored
Just access both halves of the motion vector thing directly instead of doung the cast to uint and deref. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
be30b162 -
Ville Syrjälä authored
The compiler seems to think src/mask xoff/yoff can be used uninitialized. Zero them to make sure. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
070fb84e -
Ville Syrjälä authored
The compiler seems incapable of deducing whether something is used uninitialized or not. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
fbe15cf4 -
Ville Syrjälä authored
Use a cast to avoid the "left shift of negative value [-Wshift-negative-value]" warning, and get rid of the suppression. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
e95e9d41 -
Ville Syrjälä authored
The minimum CS URB entry size is 1. Let's use that instead of 0 so that we don't end up left shifting a -1. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
97058e38 -
Ville Syrjälä authored
Fix the sign comparison warnings by changing some types, and using a few casts. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
bfeeae4d -
Ville Syrjälä authored
Deal with xserver commit 8e3b26ceaa86 ("Make PixmapDirtyUpdateRec::src a DrawablePtr") Not sure this is still correct though. Is this stuff limited to pixmaps anymore? Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com>
581ddc5d -
Chris Wilson authored
sna_display.c: In function ‘crtc_init_gamma’: sna_display.c:7462:28: warning: unused variable ‘lut’ [-Wunused-variable] sna_display.c:7444:14: warning: unused variable ‘sna’ [-Wunused-variable] Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
c6cb1b19 -
Chris Wilson authored
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111916 Fixes: 1804eacc ("sna: Add sna_br13_color_depth()") Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
bff5eca4 -
Chris Wilson authored
Minimise preemption latency by frequently checking for pending preemption events in between X11 client requests. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
b5ac286c -
Since "Make PixmapDirtyUpdateRec::src a DrawablePtr" in xserver, the "src" pointer might point to the root window (created by the server) instead of a pixmap (as created by xf86-video-intel). Use get_drawable_pixmap to handle both cases. When built with -fsanitize=address, the following test on a hybrid graphics laptop will trigger a heap-buffer-overflow error due to to_sna_from_pixmap receiving a window instead of a pixmap: xrandr --setprovideroutputsource modesetting Intel xrandr --output DP-1-1 --mode 2560x1440 # should not crash glxgears # should display gears on both screens With nouveau instead of modesetting, it does not crash but the external monitor remains blank aside from a mouse cursor. This patch fixes both. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100086 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111976 Signed-off-by:
Peter Wu <peter@lekensteyn.nl> Reviewed-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
cb6bff95 -
Chris Wilson authored
We detect when the number of boxes we wished to emit into the batch would overflow, but then miscalculated the number that would actually fit. References: https://bugs.freedesktop.org/show_bug.cgi?id=112296 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
e628d226 -
Chris Wilson authored
Issue tracking has been moved from a bugzilla instance to a gitlab instance to go alongside and integrated with the gitlab repo, still all on freedesktop.org. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
0867eea6 -
Chris Wilson authored
This reverts commit b5ac286c as it escaped before being completed. It proved it's worth in preventing sna from hogging the GPU for too long under x11perf stress, but it didn't check to see if there was enough space left in the batch before emitting the dword. Simply revert the patch for now. Reported-by:
Matti Hämäläinen <ccr@tnsp.org> Closes: #174 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
d90a2ff1 -
Fix the accidentally swapped bpp and depth values passed to the addfb ioctl when we're testing for dirtyfb presence. Currently the addfb fails every time so we don't even test the actual dirtyfb ioctl. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk>
f66d3954 -
Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
652d93cb -
Chris Wilson authored
In mesa i915/i965 pass the bpp to use when creating the surface, but the gallium state tracker passed the depth. As it happens that BitsPerPixel(format) will do the right thing for both, use that. | DRI2ATTACH_FORMAT { attachment: CARD32 | format: CARD32 } | | The DRI2ATTACH_FORMAT describes an attachment and the associated | format. 'attachment' describes the attachment point for the buffer, | 'format' describes an opaque, device-dependent format for the buffer. Should we need to use an explicit format (heavens forbid as nobody likes DRI2) then that will have to start in the range above 256 (or higher). For now the convention is defined by the mixture of i965/iris, and that is to assume it is essentially a depth. Reported-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com> References: mesa/mesa!4569 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
f2a54e25 -
Chris Wilson authored
Despite suggestions to the contrary, the BLT survived for another year. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
3d5a1238 -
A typo in tightly_packed define for builds with optimisation disabled left us creating many packed objects. When compiled with -fno-common the compiler rightfully complains about the duplication. Signed-off-by:
Alexei Podtelezhnikov <apotele@gmail.com> Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
db2356f5 -
Chris Wilson authored
Before we indicate return control of the SHM Pixmap to the client (that is prior to the next XReply), we ensure that the original SHM buffer is uptodate with any changes made on the GPU. We must flush the GPU writes back to the CPU and so not allow ourselves to keep the dirty cache of the GPU bo. Closes: #189 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Cc: Alexei Podtelezhnikov <apodtele@gmail.com> Tested-by:
Alexei Podtelezhnikov <apodtele@gmail.com>
f2853658 -
Import the kernel's i915_pciids.h, up to: commit 8717c6b7414ffb890672276dccc284c23078ac0e Author: Lee Shawn C <shawn.c.lee@intel.com> Date: Tue Dec 10 23:04:15 2019 +0800 drm/i915/cml: Separate U series pci id from origianl list. Signed-off-by:
Liwei Song <liwei.song@windriver.com> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
8c2c0a08 -
Chris Wilson authored
Closes: #162 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
846b53da -
Chris Wilson authored
The back buffer of window/pixmap is invalidated by DRI2ScheduleSwap, and is not available until the client calls DRI2GetBuffers. If they try to use their old handles, they will only get stale data. Similarly if they ask us to DRI2CopyRegion before the GetBuffers has reallocated a new back buffer, that back buffer is stale. Since the back buffer is out-of-date [likely containing data from a couple of swaps ago], we should ignore the copy to avoid glitching [by hopefully having a less noticeable glitch!] It's not entirely clear what the client intended at this point... Closes: #195 Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
e781d43d -
Chris Wilson authored
Cannonlake, then Icelake introduce new instruction formats and state command, and require a new render backend to be written. Avoid selecting the gen9 backend as this will hang! Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1864 Fixes: 3d5a1238 ("sna: Restore blt fallback backend") Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
7181c5a4 -
Add 8 and 30 to the list of supported screen depths. The colorkey massaging will be handled by the kernel so we don't have to worry about it unlike with the sprite colorkey uapi. Signed-off-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk>
5ca3ac1a
- configure.ac 1 addition, 1 deletionconfigure.ac
- src/i915_pciids.h 204 additions, 61 deletionssrc/i915_pciids.h
- src/intel_device.c 1 addition, 1 deletionsrc/intel_device.c
- src/intel_module.c 101 additions, 4 deletionssrc/intel_module.c
- src/legacy/i810/i810.h 1 addition, 1 deletionsrc/legacy/i810/i810.h
- src/legacy/i810/xvmc/I810XvMC.c 24 additions, 24 deletionssrc/legacy/i810/xvmc/I810XvMC.c
- src/meson.build 0 additions, 1 deletionsrc/meson.build
- src/sna/blt.c 2 additions, 0 deletionssrc/sna/blt.c
- src/sna/compiler.h 2 additions, 2 deletionssrc/sna/compiler.h
- src/sna/fb/fb.h 4 additions, 2 deletionssrc/sna/fb/fb.h
- src/sna/fb/fbpict.c 5 additions, 1 deletionsrc/sna/fb/fbpict.c
- src/sna/fb/fbspan.c 4 additions, 2 deletionssrc/sna/fb/fbspan.c
- src/sna/gen2_render.c 17 additions, 4 deletionssrc/sna/gen2_render.c
- src/sna/gen3_render.c 18 additions, 6 deletionssrc/sna/gen3_render.c
- src/sna/gen4_render.c 6 additions, 3 deletionssrc/sna/gen4_render.c
- src/sna/gen5_render.c 3 additions, 3 deletionssrc/sna/gen5_render.c
- src/sna/gen6_common.h 24 additions, 20 deletionssrc/sna/gen6_common.h
- src/sna/gen6_render.c 4 additions, 4 deletionssrc/sna/gen6_render.c
- src/sna/gen7_render.c 4 additions, 4 deletionssrc/sna/gen7_render.c
- src/sna/gen8_render.c 29 additions, 20 deletionssrc/sna/gen8_render.c