From patchwork Mon May 25 01:48:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1297044 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=DVoX7EnP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Vg5h4pMLz9sPF for ; Mon, 25 May 2020 11:50:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA954812FE; Mon, 25 May 2020 03:49:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DVoX7EnP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E6F9813C5; Mon, 25 May 2020 03:49:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8CB5D808A1 for ; Mon, 25 May 2020 03:49:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id 18so16097982iln.9 for ; Sun, 24 May 2020 18:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uFJN0GHU7ryaVyeSnKrPx4Z/iXBqyKOpp7qrQaWp41g=; b=DVoX7EnPID/256F5XIHgs+TeNmfkcdwV6RurwMU0dSUbyadfzimJ+gUsIvhCy6P6P4 7I3k5SXGZOSbNFVLN0iWwv60EqazLtX5m8fnx2oaotYdGpU9R127hjBqspqq8m1SmzLM e4D0m/gueQiqr31Tt0pc1dRAaMdCH2xQYSKM0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uFJN0GHU7ryaVyeSnKrPx4Z/iXBqyKOpp7qrQaWp41g=; b=eiEaiv1z+Nj8LlSgJJj+NwqQqf5JLQ9pNB1OHSadXhB3toXltQg9+TaC/M9DTPetQW +jCxz0PP1gVTYgMYFftDK8DIGi8udWnDMoyi+W09S+po9txgXOVIg4snsyMyaCeKjkI5 4bgr6U/fJqUKZsicJNGN0Fyl8X8OmoEv/CT42XWW4mRDGQOwZiyVOToSRU72yMweZl2I 716SKvYxjAT6t3kIdfmh/6FlFYMEH3rNm7dJkSOikBPJcbnSzTF4NZCWqDPEww1NfdfP hJT7r7SJliHoDCvAN3O8JKDcX3Ih6wMqr0Dil602qi7yb4rzpAcTYgn4eo6GYlNKOep6 vQ/g== X-Gm-Message-State: AOAM5337YOfR1yFFm1mpzNEmB85T0oRLZryXXq6f6DFSroGtMF9fIgrd QyHECDSRVnkbQYBrJ2IDdWwVvdX0UXFiqA== X-Google-Smtp-Source: ABdhPJw0nIdwAxJZgPCtHwX4zmzNz9a3Xz9AV9DX0Gg/BkgCeoNg3LfmXPAOW1MD4QCdpcpupCsFYg== X-Received: by 2002:a05:6e02:503:: with SMTP id d3mr23010536ils.208.1590371351372; Sun, 24 May 2020 18:49:11 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id s7sm6822965ioc.37.2020.05.24.18.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 18:49:11 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 04/26] sandbox: video: Allow selection of rotated console Date: Sun, 24 May 2020 19:48:41 -0600 Message-Id: <20200524194852.v2.4.Ic64153abc8c8e22f5b5348fe2002fa2b17239852@changeid> X-Mailer: git-send-email 2.27.0.rc0.183.gde8f92d652-goog In-Reply-To: <20200525014904.115621-1-sjg@chromium.org> References: <20200525014904.115621-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add a devicetree property to select a rotated console. This uses the same encoding as vidconsole itself: 0=normal; 1=90 degrees clockwise, 2=upside down, 3=90 degrees anticlockwise. Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin --- Changes in v2: None drivers/video/sandbox_sdl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c index 20248e6607..c678e728db 100644 --- a/drivers/video/sandbox_sdl.c +++ b/drivers/video/sandbox_sdl.c @@ -53,6 +53,7 @@ static int sandbox_sdl_bind(struct udevice *dev) plat->xres = dev_read_u32_default(dev, "xres", LCD_MAX_WIDTH); plat->yres = dev_read_u32_default(dev, "yres", LCD_MAX_HEIGHT); plat->bpix = dev_read_u32_default(dev, "log2-depth", VIDEO_BPP16); + plat->rot = dev_read_u32_default(dev, "rotate", 0); uc_plat->size = plat->xres * plat->yres * (1 << plat->bpix) / 8; debug("%s: Frame buffer size %x\n", __func__, uc_plat->size);