Age | Commit message (Collapse) | Author |
|
- Again match names of paramaters
- structs need a typedef to work in gtk-doc
- gtk-doc doesn't know about unsigned, expects unsigned int instead
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
igt_create_bo_with_dimensions() is intended to abstract differences
between drivers in buffer object creation.
The driver-specific ioctls will be called if the driver that is being
tested can satisfy the needs of the calling subtest, or it will be
skipped otherwise.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If a buffer object is dumb, call DRM_IOCTL_MODE_MAP_DUMB when mapping
it. Also, don't call DRM_IOCTL_I915_GEM_SET_DOMAIN on dumb buffers.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Just wraps drmModeDirtyFB and for now invalidates the whole FB.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This fixes potential crashes when the framebuffer is unset from a
given plane.
v2: s/with/within/ typo in header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Marius Vlad <marius.c.vlad@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
This is a helper to draw a gradient between 2 colors.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
If we create a cairo surface using a GTT mmaping, then we need to use
the GTT access domain. cairo surfaces created with a blit temporary (for
unfenced surfaces) still use the CPU domain.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
I recently had this discussion with Daniel where I didn't want to use
igt_drm_format_to_bpp() because it uses the format_desc array, and
igt_fb currently assumes that all the format_desc formats have a
matching valid Cairo format, so I wouldn't be able to easily add
formats such as ARGB2101010.
The function that has the assumption mentioned above is
igt_get_all_formats: its current users call igt_get_all_formats, and
then call cairo-dependent functions, such as igt_get_cairo_ctx on the
returned formats.
In order to document the current behavior and prevent any problems in
case we start adding new formats without matching Cairo versions to
format_desc, rename igt_get_all_formats to igt_get_all_cairo_formats
and make it explicitly check for CAIRO_FORMAT_INVALID.
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
The big motivation behind this patch is that the current power-of-two
granularity from igt_fb is way too big. There was more than one
occasion where I had to work around this problem on
kms_frontbuffer_tracking, and during my last workaround I was
requested to just make igt_fb use more minimal buffers.
I also need to export the size computation function so I won't need to
reimplement it inside kms_frontbuffer_tracking.
v2:
- Fix the Yf sizes (Ville).
- Don't change the Gen 2/3 behavior for both tiled and non-tiled.
v3:
- Edit the commit message, clarify that v1 was wrongly treating gen
2/3 non-tiled as tiled (Chris).
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Several tests do one or more of the following:
* igt_create_fb() + igt_paint_test_pattern()
* igt_create_color_fb() + igt_paint_test_pattern()
* igt_create_fb() + igt_paint_image()
Extract them into new helpers: igt_create_pattern_fb(),
igt_create_color_pattern_fb(), igt_create_image_fb().
v2: Fix typos, and improve API docs (Thomas)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
If the caller is going to specify a custom size, it's likely that he
will also specify a custom stride. The automatic stride picked by
create_bo_for_fb() is too huge for tiled buffers, so if the caller
wants smaller buffers, then he'll need a smaller stride too, otherwise
the Kernel will reject the addfb IOCTL due to stride * height being
bigger than the size.
I want to make tests/kms_frontbuffer_tracking use
igt_create_fb_with_bo_size() so I can provide smaller buffers that
will fit into the CFB. I'm also planning to make all frontbuffers with
the same width/height/format have the same stride and size regardless
of tiling method so I can exercise specific code paths.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
This patch is adding i-g-t plane scaling test case to test couple basic
display plane scaling usages. Additional test scenarios can be added later.
v2:
-Added iterative scaling to visually observe scaling (me)
v3:
-Added a flag to control primary plane scaling (me)
v4:
-Use new tiled types when calling igt_create_fb (me)
Signed-off-by: chandra konduru <chandra.konduru@intel.com>
[Thomas: convert test to use igt_simple_main]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
Until now the tests that depended on libcairo were simply
skipped in the android build. Now that I have a cairo port
working, build these cairo dependent tests if ANDROID_HAS_CAIRO
is set to 1 in the environment.
For information on building cairo for IGT on Android see the
wiki at:
https://securewiki.ith.intel.com/display/GFXCore/IGT+Test+Suite+on+Android
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
A recent commit means igt_debugfs.c now needs to include igt_kms.h,
which in turn includes igt_fb.h and hence cairo.h.
We need to avoid this inclusion of cairo.h when building for Android,
(until we have a cairo port) so I have added a #ifndef around it.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
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>
|
|
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>
|