Commit Graph

157 Commits (6a72661c33a9fcdfbb5449cc6c0c92810ed217fd)

Author SHA1 Message Date
Rob Clark ebd7904877 modetest: fix uninitialized fourcc
If color format for CRTC layer is not specified on commandline, then
c->fourcc is unintialized resulting in addfb call failing.

Signed-off-by: Rob Clark <rob@ti.com>
2012-07-23 11:35:06 -05:00
Laurent Pinchart db004badef modeset: Split buffer allocation to a separate file
As the modeset test application is often referred to as an example of
the KMS API usage, move test pattern generation and buffer allocation to
a separate file to keep it simple and clear.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart cc90ffa9b1 modetest: Make frame buffer format configurable on the command line
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart 0375222c71 modetest: Move connector and plane parsing to separate functions
This will make it easier to add additional parameters to the connector
and plane arguments.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart edcef53685 modetest: Add test pattern support for missing RGB formats
Implement tiles and SMPTE test pattern generation for the RGB565,
BGR888, RGB888, ARGB8888, BGRA8888 and BGRX8888 formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart 86402a2a0c modetest: Add test pattern support for missing planar YUV formats
Implement tiles and SMPTE test pattern generation for the NV12, NV21,
NV16 and NV61 formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart 8b6f3e32b8 modetest: Add test pattern support for missing packed YUV formats
Implement tiles and SMPTE test pattern generation for the UYVY, VYUY and
YVYU formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart a94ee62429 modetest: Add SMPTE test pattern
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:46 -05:00
Laurent Pinchart 3fdc1777ee modetest: Unify buffer allocation
Merge the create_test_buffer() and create_grey_buffer() functions into a
single buffer allocation function that takes the pixel format and fill
pattern as parameters.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:46 -05:00
Kristian Høgsberg c0ed9b23ec modetest: Dump bit field names 2012-06-28 13:24:36 -04:00
Rob Clark 25e4cb4659 modetest: support plane properties
Add support to display plane properties.

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2012-06-08 09:27:21 -05:00
Rob Clark 6df9e6af4b modetest: support bitmask properties
Add support to display bitmask properties.

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2012-06-08 09:27:21 -05:00
Paulo Zanoni 86dece4cf2 modetest: print CRTC properties
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2012-06-08 09:27:21 -05:00
Inki Dae e07b650662 libdrm: add exynos drm support
this patch adds libdrm_exynos helper layer that inclues some intefaces
for exynos specific gem and virtual display driver and also adds exynos
module name to modtest and vbltest.

Changelog v2:
- fixed exynos broken ioctl.
  the pointer of uint64_t *edid should be removed.
- removed unnecessary definitions.
- added drm prime interfaces.
  this feature is used to share a buffer between drivers or memory managers
  and for this, please, refer to below links:
	http://www.mjmwired.net/kernel/Documentation/dma-buf-sharing.txt
	http://lwn.net/Articles/488664/

this patch is based on a link below:
	git://anongit.freedesktop.org/mesa/drm
	commit id: d72a44c7c4

Reviewed-by: Rob Clark <rob@ti.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rob Clark <rob@ti.com>
2012-05-12 10:04:54 -05:00
Paulo Zanoni d72a44c7c4 modetest: print more about our properties
In the future we'll have more than just connector properties, so create
a dump_prop function that can handle any property (instead of the
current dump_props function that only handles connector properties).

Also, make this function print a lot more information about the existing
properties.

Also change the printed indentation of the modes to make the output more
readable.

The previous function dump_props also segfaulted when we didn't have
enought permissions. The new function does not segfault in this case (by
checking for the return value of drmModeGetProperty).

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-03 13:32:02 +02:00
Paulo Zanoni 0ef7644fe5 modetest: call drmModeFreePlaneResources
24 (16 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 7
   at 0x402994D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4A25950: drmMalloc (xf86drm.c:147)
   by 0x4A2E26D: drmModeGetPlaneResources (xf86drmMode.c:951)
   by 0x4025FF: dump_planes (modetest.c:276)
   by 0x4052AF: main (modetest.c:1120)

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-03 13:31:00 +02:00
Paulo Zanoni a10bcaaf66 modetest: fix drmModeGetConnector memory leak
Don't "continue" without freeing the connector.

192 bytes in 6 blocks are indirectly lost in loss record 6 of 12
   at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4E30DD8: drmMalloc (xf86drm.c:147)
   by 0x4E35024: drmAllocCpy (xf86drmMode.c:73)
   by 0x4E35D69: drmModeGetConnector (xf86drmMode.c:507)
   by 0x402F22: dump_connectors (modetest.c:181)
   by 0x40261B: main (modetest.c:801)

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-03 13:30:49 +02:00
Paulo Zanoni 9b44fbd393 modetest: fix some compiler warnings
Use unsigned int instead of int:
- modetest.c:90:1: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
- modetest.c:98:1: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
- modetest.c:118:1: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
- modetest.c:286:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
- modetest.c:303:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
- modetest.c:694:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
- modetest.c:1088:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

The 'fd' variable is global, we don't need to pass it as an argument:
- modetest.c:998:40: warning: unused parameter ‘fd’ [-Wunused-parameter]

We don't use the 'modeset' variable:
- modetest.c:1025:8: warning: variable ‘modeset’ set but not used [-Wunused-but-set-variable]

V2: rebase, clear some more warnings

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-03 13:30:24 +02:00
Rob Clark 67fd052c01 modetest: fix typo
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rob Clark <rob@ti.com>
2012-04-11 09:41:29 -05:00
Rob Clark 2f1e2101b4 modetest: add AR15/XR15 (RGB-1555) formats
Signed-off-by: Rob Clark <rob@ti.com>
2012-04-03 16:49:23 -05:00
Rob Clark b83ad86622 modetest: add YUV and multi-planar support
Signed-off-by: Rob Clark <rob@ti.com>
2012-04-03 16:49:12 -05:00
Rob Clark d55de747a2 modetest: add drm_plane support
Signed-off-by: Rob Clark <rob@ti.com>
2012-04-03 16:48:56 -05:00
Rob Clark ef1b958cc8 omap: add omapdrm support
This adds libdrm_omap helper layer (as used by xf86-video-omap,
omapdrmtest, etc).

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
[danvet: pushed for Rob, he doesn't yet have commit access.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-28 23:00:14 +02:00
Jakob Bornecrantz d23146f3f0 modetest: Call dirty fb on modeset
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-19 13:35:07 +02:00
Jakob Bornecrantz 680b9c4fa3 modetest: Print extra info if we fail to create a framebuffer
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-19 13:35:07 +02:00
Jakob Bornecrantz 3c8adda6e1 modetest: Check error message from pageflip ioctl
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-19 13:35:07 +02:00
Jakob Bornecrantz dc11db2e28 tests: Add vmwgfx driver to probed drivers in tests
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-19 13:35:06 +02:00
Jesse Barnes b317c96361 modetest: use 24 bit depth on the framebuffer
It's more compatible; at least the Intel driver now rejects 32 bit
depths since it generally can't support real 32 bit framebuffers
(supports 30, 36, and 64 bit, but not 32).
2011-10-11 11:10:55 -07:00
Benjamin Franzke a697fb6aca modetest: Do no flip twice to a current front buffer
The incorrect order was:
fb, other_fb, other_fb, fb_id, other_fb, ..
2011-02-17 20:40:30 +01:00
Benjamin Franzke 8fef29093f modetest: Create buffers using libkms 2011-02-17 14:06:07 +01:00
Chris Wilson 7ec9a1effa modetest: Fix drawing routines to use stride. 2010-09-09 18:57:28 +01:00
Jesse Barnes 0da84f89c2 modetest: align fb pitch to 64 bytes
Docs say this is necessary, and the kernel now enforces this.
2010-09-09 10:27:22 -07:00
Jesse Barnes b8abe6139e modetest: add edp and TV connector names to the connector name array 2010-09-07 13:10:15 -07:00
Jesse Barnes e6b3f906ce modetest: add optional select codepath
For misc. testing.
2010-03-26 13:14:38 -07:00
Marcin Kościelnicki 9a37455b35 tests/modetest: Don't get_props on a connector after freeing it. 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki 694ef59532 tests: vrefresh is actually not * 1000. 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki ecb668e1ef tests: Add nouveau to list of supported modules. 2010-02-28 00:25:22 +00:00
Matthew W. S. Bell e4a519635f Tidy up compile warnings by cleaning up types. 2010-02-04 19:45:10 -05:00
Kristian Høgsberg 59d97e7d68 modetest: Error out if pageflipping is requested but not available 2009-12-15 08:44:40 -05:00
Jesse Barnes 6f1eba0548 modetest: fix build error due to page_flip_handler name change
Forgot to update this when pushing the pageflip bits.
2009-12-04 09:09:19 -08:00
Jesse Barnes 53addc5d6e Merge branch 'pageflip' of git://people.freedesktop.org/~jbarnes/drm
Conflicts:
	include/drm/drm.h - RMFB had its signature changed to avoid uint32_t
2009-12-03 14:17:26 -08:00
Kristian Høgsberg 1e1b3c0a93 modetest: add pageflip test case to modetest 2009-11-20 14:53:38 -08:00
Kristian Høgsberg 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00
Kristian Høgsberg a66cf9ce68 Use headers copied from kernel instead of shared-core 2009-11-17 10:54:11 -05:00
Jesse Barnes 81644198ae modetest: use gtt unmap for object
Match gtt map/unmap for correctness.
2009-06-22 12:27:49 -07:00
Kristian Høgsberg 9fc85b4084 modetest: Print names of properties. 2009-02-23 15:10:30 -05:00
Kristian Høgsberg 8b8803695b modetest: Add syntax to also specify a crtc when setting a mode. 2009-02-04 12:17:32 -05:00
Kristian Høgsberg 7a389aab86 modetest: Use cairo (if available) to paint a better pattern. 2009-02-03 15:03:41 -05:00
Kristian Høgsberg 2c113a1b15 modetest: Don't sleep when just dumping state, wait for key for modeset. 2009-02-03 14:03:09 -05:00
Kristian Høgsberg 669fde3472 modetest: Handle setting modes on multiple crtcs with one fb. 2009-02-03 14:00:00 -05:00
Kristian Høgsberg d9c55a6bec modetest: Use a more interesting test pattern. 2009-02-03 13:26:38 -05:00
Kristian Høgsberg bf46e0941f No need to pin buffer anymore in modetest.c 2009-02-02 15:47:09 -05:00
Kristian Høgsberg 0243c9f801 modetest: Print more stuff. Prettier. 2008-12-18 00:02:43 -05:00
Eric Anholt 06ab2f6436 libdrm: Fix modetest/modeprint to use automake stuff. 2008-12-17 10:41:21 -08:00
Jesse Barnes 731cd5526e libdrm: add mode setting files
Add mode setting files to libdrm, including xf86drmMode.* and the new
drm_mode.h header.  Also add a couple of tests to sanity check the
kernel interfaces and update code to support them.
2008-12-17 10:11:37 -08:00
Jesse Barnes 9583c099b4 Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db1055.

We really just want the libdrm and ioctl bits, not all the driver
stuff.
2008-12-10 15:50:22 -08:00
Jesse Barnes 8f5d8ba97e Update modetest 2008-11-19 10:54:11 -08:00