From mboxrd@z Thu Jan 1 00:00:00 1970 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 53C94C54EE9 for ; Tue, 13 Sep 2022 09:22:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 411BE8456E; Tue, 13 Sep 2022 11:22:08 +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="f2bMfNpF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B603841BC; Tue, 13 Sep 2022 11:22:03 +0200 (CEST) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 B689784601 for ; Tue, 13 Sep 2022 11:21:59 +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-pg1-x529.google.com with SMTP id h188so10732845pgc.12 for ; Tue, 13 Sep 2022 02:21:59 -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=Y7XdrHf098VpOzKYl6rq+t7/z4be9kcIwr3e8KepgBU=; b=f2bMfNpFpha+eYDj46RZ1ibIU+IpDakW26Z5vjXm/q1IZ+mZukb00KjSsZ+rveTA13 VlY1Lo/iZ6DFJXgu+qpAkTrnPUQweVLyWblBypWq7GIDT0mqZOoif9c7EpnpIJ6tAqSZ M8AJua+Sa2pl04NTjw9wid0Uzci6aN857HnEt3qnk3jTVGy6EATS/s4tLKEhoTJhqmmW +ncYpLi5ySWRxtUtQk1tFUtqAGUbZM0knV6FrPGkJBYc9g0xoW671WwlVIEPV1sz3V6E fVRfSZgVjMJCUZAU39/3s+d+/JPCcI3vYPoQg+eXDUyUYeH+Y05oCmgcw9AUOL7dOm89 9Vwg== 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=Y7XdrHf098VpOzKYl6rq+t7/z4be9kcIwr3e8KepgBU=; b=GdCHoW2qFsHncRplSOHe99exokVRMoGV/0igLuhMdf5Gqbwue1L2ZFwJxtod+e08KN 65faip3ixiYJSZdfgmkKBkivU0m4dSiDe6LxknNx1Cuj06wwRpMXMUhMM99bHFk/X4nw vYg66FHT0NavhBCQtJbpg0X2KxBz2rJO//V6gl2yrh3K3XcUnK/EoCtIQSVIxpwA4SoC hM5hheutTUS1VsyJs/Sz8EY8maGuKzxLVQdUPr/IGcsx2GdcNwRoFZXuSjpUGewNcDy2 q+WhSFSMGoS/0j0KLMo3C63X9IKDGsWG32PZNFMNLsH+IEjJfzPcAktbK6/Adrf3s586 rEkg== X-Gm-Message-State: ACgBeo2YxOwkALtbEMN4UkH2pU8OUFzHj10msGvDzAB3ET0cEWZvJF1P 8Gju+s6CraqZicpbvxUFO1Jl0DbYG/E= X-Google-Smtp-Source: AA6agR6DzmvCRnH8+LbNPwqabCgk1cHVdiLVEG6lrwk+ZsgHn0v5xGSI3uRGy8sOytg4+zV1Zqo1JQ== X-Received: by 2002:a63:50e:0:b0:438:d16d:e8c1 with SMTP id 14-20020a63050e000000b00438d16de8c1mr11030922pgf.505.1663060917474; Tue, 13 Sep 2022 02:21:57 -0700 (PDT) Received: from caret.lan (p83d5ae91.tokynt01.ap.so-net.ne.jp. [131.213.174.145]) by smtp.gmail.com with ESMTPSA id z17-20020a170902ccd100b0016eede528b4sm7810732ple.61.2022.09.13.02.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 02:21:56 -0700 (PDT) From: Takumi Sueda To: u-boot@lists.denx.de Cc: agust@denx.de, sjg@chromium.org, Takumi Sueda Subject: [PATCH v2 1/1] video: simplefb: Add rotation support Date: Tue, 13 Sep 2022 18:21:10 +0900 Message-Id: <20220913092110.13606-1-puhitaku@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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..235ec761f7 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) { + log_debug("%s: invalid rot\n", __func__); + return log_msg_ret("rot", -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