summaryrefslogtreecommitdiff
path: root/tests/modetest/modetest.c
AgeCommit message (Collapse)Author
2015-05-28modetest: add atmel-hlcdc driver supportBoris BREZILLON
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2015-05-28modetest: only select plane with matching formatTobias Jakobi
Don't assume that a plane supports any kind of pixelformat but do a check first. v2: Simplify the format check. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-05-28modetest: replace malloc + memset with callocEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-28modetest: explicitly zero the newly allocated memoryEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-28modetest: destroy the cursor boJoonyoung Shim
Currently we are missing the bo_destroy() when modetest terminates. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: clear buffer and framebuffer for planesJoonyoung Shim
Currently we don't destroy buffer and remove framebuffer for planes when closing modetest. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message. fb_id = 0 is unused] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: fix the error path handlingJoonyoung Shim
Remove the framebuffer and destroy the bo when error occurs on set_mode and test_page_flip. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: make use of drmModeRmFBJoonyoung Shim
We should remove the framebuffer before destroying the buffer. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message. fb_id = 0 is unused] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: fix Segmentation faultJoonyoung Shim
If use -P option without -s option, the program segfaults due to dev.mode.bo being NULL. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: initialize handles/pitches in set_plane()Tobias Jakobi
Only the 'offsets' array was initialized to zero. Since bo_create only sets the handles which are necessary, were we passing garbage data to the kernel when calling drmModeAddFB2 later. The issue only seems to appear when passing e.g. NV12 data to the kernel, a case where not only handles[0] is used. I therefore also removed the corresponding comment. v2: Do the same for set_mode(), set_cursors() and test_page_flip(). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28Add missing <strings.h> includesGreg Hackmann
A couple of files use ffs() without explicitly including strings.h. Some systems will pull in ffs()'s declaration through another header anyway, but not when compiling against bionic in AOSP master. Signed-off-by: Greg Hackmann <ghackmann@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-15modeprint: add missing encoder/connector type namesRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-20tests: add rockchip to modetest, kmstest, vbltest and proptestDaniel Kurtz
There is a rockchip drm kms driver. Add "rockchip" to the static lists of driver names in the the standard set of tests. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> [Emil Velikov: Resolve trivial conflicts.] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-25tests: add support for imx-drmPhilipp Zabel
Since imx-drm has graduated from staging it seems to be a good idea to recognize it by default in the libdrm tests. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-01-11modetest: Allocate dumb buffers with the correct bppLaurent Pinchart
The modetest application uses libkms to allocate dumb buffers, leading to overallocation due to the hardcoded 32 bpp value. This can even cause failures in drivers when the resulting pitch is too large for the hardware to handle and gets rejected by the driver when creating the frame buffer. Fix this by computing the required bpp value and allocating dumb buffers directly without going through libkms. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2014-11-27libdrm: Add NVIDIA Tegra supportThierry Reding
Add the libdrm_tegra helper library to encapsulate Tegra-specific interfaces to the DRM. Furthermore, Tegra is added to the list of supported chips in the modetest and vbltest programs. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-24update signed/object prop typesRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: Print newline for empty blobsVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24modetest: universal plane supportRob Clark
Minimal support, so we can at least dump properties of primary/cursor planes. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-09-28modetest: Add support of STI driverBenjamin Gaignard
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-01all: include config.h only when available and use its definesEmil Velikov
... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-22modetest: add cursor supportRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-12modetest: add the possibility to select the refresh frequency for a modeVincent ABRIOU
When mode is selected we only give the name of the mode as parameter. But sometime, two different modes have the same name but not the same vrefresh frequency. This patch give the possibility to select a mode by its name and optionally by its refresh frequency. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-11modetest: allow setting a scaling factor when showing planeIlia Mirkin
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-09-11modetest: add a -D option to specify a device to be usedIlia Mirkin
This is helpful for differentiating between multiple devices that use the same module. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-08-30tests/modetest: silence compiler warning about uninitialised variablesEmil Velikov
The compiler is unaware of that we have at least one crts/connector/plane thus it complains that some of our variables will be used uninitialised. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
2013-08-30tests: add msmRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-08-05modetest: Try all possible encoders for a connectorLaurent Pinchart
When building the pipeline, instead of using only the encoders attached to a connector, take all possible encoders into account to locate a CRTC. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Support pipes with multiple connectorsLaurent Pinchart
The -s argument can now take a list of connectors. Configure all of them in cloned mode using a single CRTC. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Rename struct connector_arg to struct pipe_argLaurent Pinchart
This prepares the code for handling multiple connectors in a single pipeline in a cloned configuration. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Split mode setting and plane setupLaurent Pinchart
There's not reason to require setting a mode to test planes. Split the two operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Give the CRTC ID to the -P optionLaurent Pinchart
Planes are associated with CRTCs, not connectors. Don't try to be too clever, use the CRTC ID in the -P option. This prepares for splitting CRTC and planes setup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Store the mode in the crtc structureLaurent Pinchart
This prepares the code for the split in separate functions of CRTC and planes setup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Store the crtc in the connector_arg structureLaurent Pinchart
This prepares the code for the split in separate functions of CRTC and planes setup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Remove the struct connector_arg encoder fieldLaurent Pinchart
The field is no needed, make it a local variable where used. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Compute CRTC pipe number as neededLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Create a device structureLaurent Pinchart
Instead of passing the device fd and resources as global variables group them in a device structure and pass it explictly to all functions that need it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Remove the -m argumentLaurent Pinchart
The argument isn't used, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Print the plane ID when setting up a planeLaurent Pinchart
As modetest automatically selects an unused plan, providing the plane ID allows modifying plane properties for the selected planes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Allow specifying plane positionLaurent Pinchart
Extend the -P option to allow specifying the plane x and y offsets. The position is optional, if not specified the plane will be positioned at the center of the screen as before. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Add a command line parameter to set propertiesLaurent Pinchart
The -w parameter can be used to set a property value from the command line, using the target object ID and the property name. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Don't limit mode set and planes to two instancesLaurent Pinchart
Configuring mode on more than two connectors or two planes is perfectly valid. Support it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Retrieve all resources in one goLaurent Pinchart
Instead of retrieving resources as they are needed, retrieve them all (except property blobs) in one go at startup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Add a command line parameter to drop master after mode setLaurent Pinchart
If the -d parameter is specified, modetest will drop master permissions after setting the mode. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-05modetest: Add a command line parameter to select the driverLaurent Pinchart
If the -M parameter is specified, modetest will use the requested device name instead of trying its builtin list of device names. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2013-08-05modetest: Sort command line argumentsLaurent Pinchart
The current mostly random sort order hinders code readability. Sort the options alphabetically in the code, and by group in the help message. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2013-08-05modetest: Remove extern declarations of opt(arg|ind|err|opt)Laurent Pinchart
Those variables are declared in unistd.h, there's no need to redeclare them here. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2013-08-05modetest: Fix warningsLaurent Pinchart
Enable all standard automake warnings except for -Wpointer-arith (as the test pattern generation code uses void pointer arithmetics) and fix them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2013-08-01tests: add tilcdc to modetest/vbltestRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-04-18modetest: Reduce the length of the connector type stringVille Syrjälä
Spelling out eDP or DP make for a ridicilously long string which plays havoc with formatting. Just say eDP or DP. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>