summaryrefslogtreecommitdiff
path: root/lib/igt_fb.c
AgeCommit message (Collapse)Author
2015-03-12lib/fb: Use PRIx64 for uint64_t in format stringDamien Lespiau
Fix the following warning: igt_fb.c: In function 'igt_create_fb_with_bo_size': igt_fb.c:414:2: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 9 has type 'uint64_t' [-Wformat=] igt_debug("%s(width=%d, height=%d, format=0x%x [bpp=%d], tiling=%llx, size=%d\n", introduced by commit: commit e36091d1c7010e825897dc4487f9985ab353973b Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Date: Tue Mar 3 14:11:01 2015 +0000 tiling: Convert framebuffer helpers to use fb modifiers Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12lib: Allow the creation of Ys/Yf tiled FBsDamien Lespiau
There's no fencing for those tiling layouts, so we create a linear bo for cairo to play with, and when cairo is finished with it, we do a fast copy blit to the fb BO with its final tiling. v2: Move to correct domain after CPU is done with the object (-EINVAL). (Tvrtko Ursulin) Correct arguments passed in to framebuffer creation (segfault). (Tvrtko Ursulin) Pass zero stride to kernel as it expects for Yf&Ys. (Tvrtko Ursulin) v3: Rebase for gem_mmap__cpu changes. (Tvrtko Ursulin) v4: Rebase for addfb2.5. (Tvrtko Ursulin) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12lib/igt_fb: Use new ADDFB2 extension for new tiling modesTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12tiling: Convert framebuffer helpers to use fb modifiersTvrtko Ursulin
This converts the IGT API only, underneath legacy set_tiling is still used. v2: One got away in kms_flip. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-06lib/igt_fb: Ignore RGB888Chris Wilson
None of our display hardware supports the packed 24-bit format, so stop trying to use it and causing test failures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78873&list_id=465068 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06lib/igt_fb: Add debug output for creating fbChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-05lib/igt_fb: ensure igt_create_fb parameters are consistentThomas Wood
Make sure the parameters in the prototype and implementation of igt_create_fb match and are complete so that the documentation is correct. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: move create_stereo_fb from testdisplay to igt_fbThomas Wood
Move create_stereo_fb from testdisplay to igt_create_stereo_fb in igt_fb so that it can be used in other tests. v2: update for new igt_create_fb API add parameters for format and tiling remove some old debug code Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-08-26lib/intel_* Use igt checks and macrosDaniel Vetter
Various stuff all over. Most done with the igt.cocci spatch, but with a few fixups by hand. And add igt_core.h includes where needed. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-21lib/fb: Assert, instead of silently failing, when creating fbsDamien Lespiau
We were either returning 0, or a negative value cast to an unsigned int for errors and the clients of that API weren't exactly checking anything. We're in luck, we can take shortcuts in a testing library to just assert when an expected error occurs. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21lib/fb: Replace straight igt_fail() by asserts with debug messagesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21lib: Change the fb creation functions to take fully qualified tiling formatsDamien Lespiau
In the future, we'll need more than X tiling here. So give a full enum instead of bool meaning X-tiled. It's fine to do this change without updating the users just yet as 'true' happens to be I915_TILING_X. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-29lib: Don't take a reference to the surface in get_cairo_surface()Damien Lespiau
We don't need to keep a reference to the surface, the cairo context will keep a reference to it until we destroy it. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-29lib: NULLify ->cairo_surface once unmappedDamien Lespiau
Just a matter of not leaving dangling pointers around. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-29lib: Split the GTT mapping out of get_cairo_surface()Damien Lespiau
This is preparation work for when we need a different way to get a linear buffer we can use with cairo. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-05-16lib/igt_fb: igt_create_fb_with_bo_sizeOscar Mateo
Useful for testing bigger/smaller fb-wrapped buffer objects. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-05-13lib/igt_core: Document testrunner interface a bitDaniel Vetter
Also fix up one gtkdoc fumble in igt_fb. We should use symbolic defines if possible instead of just listening the magic 0, 77, 78 values for exit codes, but that's a separate patch. Cc: tim.gore@intel.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-13lib/kmstest: Fix up tiled buffer creationDaniel Vetter
When extracting a raw __gem_set_tiling helper I've fumbled this in commit 590f6101402b51bca54f69c002380bda967484ea Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Oct 9 20:50:50 2013 +0200 lib/drmtest: extract rawer __gem_set_tiling Fix things up so that we properly propaget the error again. Now to make this all properly work we also need to make kms_flip a notch more robust against such failures ... This only blows up on gen2/3 with the pan tests which want a too wide framebuffer for tiling. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: api documentationDaniel Vetter
Also realign function parameters and replace abort() with igt_fail() while at it. v2: Forgotten to add a nice intro. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: setup font in igt_get_cairo_ctxDaniel Vetter
We always want the same boring one, so extract it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: drop kmstest_ prefix from static functionsDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_kms/bf: doc skeletonDaniel Vetter
igt_kms docs are just skeleton and also added igt_fb to make sure the linking works correctly. Next up: Actually documenting igt_fb. Also fix that depency spelling fumble I've copied around to a few too many places. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: switch to igt_ prefix from kmstest_Daniel Vetter
Shorter and more in line with our general igt_ prefix for everything which isn't somehow intel or i915-gem or otherwise hw specific - these helpers here are all fully generic framebuffer handling functions based on kms + cairo. Well, the actual buffer alloc is done with i915 gem, but meh ;-) Two special cases: - bpp_depth_to_drm_format and drm_format_to_bpp completely lacked prefixes, so just add igt_. - write_fb was a bit misleading given that we have gem_write for uploading to buffers. Rename that to write_fb_to_png to make it crystal clear what this thing does even without looking at docs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib: extract igt_fb libraryDaniel Vetter
Stuff all the framebuffer creation, cairo and drm fourcc format handling in there. This gives us a very clear cut in the headers where igt_fb.c only needs to include igt_fb.h, and igt_kms.c includes both (well igt_kms.h pulls in igt_fb.h since we always need this). The aim here is to add api docs for igt_fb since that part of the kms library seems fairly stable already, while all the mode setting and iteration is still a bit in flux. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>