From patchwork Tue Jan 5 16:31:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 563194 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 55015140C39 for ; Wed, 6 Jan 2016 03:37:53 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=a5q1REJ1; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A49404B7FD; Tue, 5 Jan 2016 17:37:41 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qf9Jc48SQ9QL; Tue, 5 Jan 2016 17:37:41 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CEB5C4B7AF; Tue, 5 Jan 2016 17:37:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8552E4B792 for ; Tue, 5 Jan 2016 17:37:36 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n0OnIqyXxah1 for ; Tue, 5 Jan 2016 17:37:36 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by theia.denx.de (Postfix) with ESMTPS id 181CA4B71D for ; Tue, 5 Jan 2016 17:37:33 +0100 (CET) Received: by mail-oi0-f43.google.com with SMTP id l9so249454902oia.2 for ; Tue, 05 Jan 2016 08:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=wW5imYE349XoofP8Ilw0Hl6Z9rpHPBdPfBvCaIF4twU=; b=a5q1REJ1IXJikMsrmXAi6VU3YNb41NAFHl3pGVLAAAZWc0U3mcP0SWrgdlFnZW/RIp Owx/r6uy/VdIswacjjdbTIqJrvyGqNqMGOoM6uwQIZ2aWCPPf6G5qE6aTV3+LV070wIQ hvWOItTffP6cgS336mXXwS4cf/bRRG7ydHgrOqse+3oRSnZmHCvS3kw00Yh95HlJfIBC E3A7M6Qc3fAS36hJju+QepNkdtpJ4JAl6pS0FjFzF4t10q5dt3p2IMAGEtN7yDXFVjFp PN+WdyroVc3ushzpxLlHELqZnMW6oH8QVlxVHzAIJIw3K+MtgxE/aII4QzMVfhLuxXhK bJPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=wW5imYE349XoofP8Ilw0Hl6Z9rpHPBdPfBvCaIF4twU=; b=lYGN1qcmoZaUlZs9NHrvXQzr26DSC798ndTO9L0GiM80bTA9Dz/AbgHb2WgD6eIHK+ +sTTTCY7o8FYsdxE6/PRPa4cH8aJNkRAZ6r80VQSuigUHHyKg9N5NbFd9eeoOmOLfFAg Uk9J6OTTBN0RdSXm3T6Y7lugdkSOBQrMA6LmS9XPmsFrXJmCja2XbuXGOkssX2IPj/iJ i93ud27oA13z2p/z03EFy7rRXLaTBGIOpvD4JZdMGYTitrKdSKKqUJk9qo0Sg7cr7Fr6 /Wr1gm4hYUwczR98BCCz+arCdFbQtsG1hE26ubnWTvLYMkGCzTgN//zBLYL/Ds932LUD sp1w== X-Gm-Message-State: ALoCoQlU3y1SVG+0VOUycXqPwYIuDTqx7q8DzxNL8ReA5a/kvJPzjS8PK2qp5UhpFQeITVEnfZ1Qo7r+Qkzej07hN6Ufa7ZN2Q== X-Received: by 10.202.60.67 with SMTP id j64mr1406526oia.70.1452011851774; Tue, 05 Jan 2016 08:37:31 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id wh4sm36556739obc.10.2016.01.05.08.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2016 08:37:31 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id DE10F2227C3; Tue, 5 Jan 2016 09:31:31 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Tue, 5 Jan 2016 09:31:13 -0700 Message-Id: <1452011474-15207-18-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1452011474-15207-1-git-send-email-sjg@chromium.org> References: <1452011474-15207-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH 17/18] dm: video: test: Add tests for rotated consoles X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Test that text is displayed correctly when the console is rotated. Signed-off-by: Simon Glass Acked-by: Anatolij Gustschin --- configs/sandbox_defconfig | 1 + test/dm/video.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 3b6017f..b55d5e5 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -77,6 +77,7 @@ CONFIG_USB_STORAGE=y CONFIG_USB_KEYBOARD=y CONFIG_SYS_USB_EVENT_POLL=y CONFIG_DM_VIDEO=y +CONFIG_VIDEO_ROTATION=y CONFIG_VIDEO_SANDBOX_SDL=y CONFIG_SYS_VSNPRINTF=y CONFIG_CMD_DHRYSTONE=y diff --git a/test/dm/video.c b/test/dm/video.c index 5867a4f..a5332fa 100644 --- a/test/dm/video.c +++ b/test/dm/video.c @@ -188,3 +188,30 @@ static int dm_test_video_context(struct unit_test_state *uts) return check_vidconsole_output(uts, 0, 788, 453); } DM_TEST(dm_test_video_context, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); + +/* Test rotated text output through the console uclass */ +static int dm_test_video_rotation1(struct unit_test_state *uts) +{ + ut_assertok(check_vidconsole_output(uts, 1, 1112, 680)); + + return 0; +} +DM_TEST(dm_test_video_rotation1, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); + +/* Test rotated text output through the console uclass */ +static int dm_test_video_rotation2(struct unit_test_state *uts) +{ + ut_assertok(check_vidconsole_output(uts, 2, 785, 446)); + + return 0; +} +DM_TEST(dm_test_video_rotation2, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); + +/* Test rotated text output through the console uclass */ +static int dm_test_video_rotation3(struct unit_test_state *uts) +{ + ut_assertok(check_vidconsole_output(uts, 3, 1134, 681)); + + return 0; +} +DM_TEST(dm_test_video_rotation3, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);