tvservice: Add check to warn when running with kms

This commit is contained in:
popcornmix
2021-09-28 12:52:01 +01:00
committed by Dom Cobley
parent 37030a77e4
commit ade66719aa
2 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include)
add_executable(tvservice tvservice.c)
target_link_libraries(tvservice vchostif)
target_link_libraries(tvservice vchostif bcm_host)
install(TARGETS tvservice
RUNTIME DESTINATION bin)

View File

@@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assert.h>
#include <string.h>
#include "bcm_host.h"
#include "interface/vmcs_host/vc_tvservice.h"
#define TV_SUPPORTED_MODE_T TV_SUPPORTED_MODE_NEW_T
@@ -806,6 +807,14 @@ int main( int argc, char **argv )
int sdtvon_progressive = 0;
TV_ATTACHED_DEVICES_T devices;
if (bcm_host_is_kms_active())
{
fprintf(stderr, "%s is not supported when using the vc4-kms-v3d driver.\n"
"Similar features are available with standard linux tools\n"
"such as modetest from libdrm-tests.\n", argv[0]);
exit(1);
}
// Initialize VCOS
vcos_init();