Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C0E3ECAAA1 for ; Mon, 12 Sep 2022 12:15:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5193684B97; Mon, 12 Sep 2022 14:14:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Qew1BSir"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC97C84895; Mon, 12 Sep 2022 08:34:05 +0200 (CEST) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 E49C38495A for ; Mon, 12 Sep 2022 08:34:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=puhitaku@gmail.com Received: by mail-pj1-x102b.google.com with SMTP id m10-20020a17090a730a00b001fa986fd8eeso11405182pjk.0 for ; Sun, 11 Sep 2022 23:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=zG/qWakSZpz1ulL6jt0Bry1oEOUIj81zYlS97AnGD7A=; b=Qew1BSir+Hdj74/rHJyZwi24v7xLv5DtjiwlXdp4ptaWKYDLRNZ6Abeu6VkenO2q0/ jQ+GHT6mC3GfWf+fEptFEs4KnzIxT04BWQhMsSEdxqqAqQgXWKr/czgm4basWwAmxO0n fidtiq/LUQFixu2ZQbWcIIFhfBIqPsjzATqubFzEZT2W6YC+HOuEQ3b4E41u9Dwxdmcx HB6hTjkrsyyazHwZ3tS4uoJLUcpE+V2jaAZp07yCXzlqfFFqFePPfkeW9SYAOYQQTbpS meOFkivTMFDJJQuoe4Jibwd1uXkT3iJqSUviBLjweGE2irio1W1DhrY65rpU4wKLfEDx mmOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=zG/qWakSZpz1ulL6jt0Bry1oEOUIj81zYlS97AnGD7A=; b=xql2xcjJEKeOKg7zDvPSxntSGENqrjQ9hgZgKjZteMH5+YtKFNhdf6Bk0jJ1m5R8lc wNCtOatyOxJqmiOblP6gEcfSMfOwI6KtRd7sX5zPJ9VcU6X+esBSx037au8ZGbimLp1t tWv/5q1ClOTnzALwlFrI/SaS9VH01ttpwEcsTRkHAAHx/QuAbtONuIwYY1ts5RcICTsC MDcFYI72cFxycCT9xhLM7CLOY5r4Hmb4LuqMM8OoD2WIaX+uTWSKds8gd8xoE82IU07n aWneLBZU4X7q3tS2JuajYdcFhySCD3DcaCh8DA/f/DXGGpxndpYVBIl5IP+DFfDKWyJJ owpQ== X-Gm-Message-State: ACgBeo0+KMgdv4j/G0aFpd8VuAV/fRMzrYOhoDwqYLXquDJlNYDwK9LG Jb7lnEj1H7tHGDTPSgeJr4cDD+bI12g= X-Google-Smtp-Source: AA6agR4wjFkkSc22VbL/vzkIeq0G7q2eMuNkvNoQwhkpwUZSZtMHwnpGalO6WhSxcuBFlr1tLMjduw== X-Received: by 2002:a17:902:a982:b0:170:d646:5851 with SMTP id bh2-20020a170902a98200b00170d6465851mr26349615plb.134.1662964439867; Sun, 11 Sep 2022 23:33:59 -0700 (PDT) Received: from caret.lan (p83d5ae91.tokynt01.ap.so-net.ne.jp. [131.213.174.145]) by smtp.gmail.com with ESMTPSA id a6-20020a17090a70c600b001ef81574355sm4386607pjm.12.2022.09.11.23.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 23:33:58 -0700 (PDT) From: Takumi Sueda To: u-boot@lists.denx.de Cc: agust@denx.de, Takumi Sueda Subject: [PATCH] video: simplefb: Add rotation support Date: Mon, 12 Sep 2022 15:33:26 +0900 Message-Id: <20220912063326.13033-1-puhitaku@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 12 Sep 2022 14:14:41 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean It introduces the way to rotate the screen for boards with rotated screen. Signed-off-by: Takumi Sueda --- drivers/video/simplefb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c index 2b0d8835e3..dbf55ba64d 100644 --- a/drivers/video/simplefb.c +++ b/drivers/video/simplefb.c @@ -43,7 +43,11 @@ static int simple_video_probe(struct udevice *dev) uc_priv->xsize = fdtdec_get_uint(blob, node, "width", 0); uc_priv->ysize = fdtdec_get_uint(blob, node, "height", 0); - uc_priv->rot = 0; + uc_priv->rot = fdtdec_get_uint(blob, node, "rot", 0); + if (uc_priv->rot > 3) { + printf("%s: invalid rot\n", __func__); + return -EINVAL; + } format = fdt_getprop(blob, node, "format", NULL); debug("%s: %dx%d@%s\n", __func__, uc_priv->xsize, uc_priv->ysize, format); -- 2.20.1