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 1ADB5C6FA82 for ; Tue, 13 Sep 2022 08:15:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93E52849CD; Tue, 13 Sep 2022 10:15:38 +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="HF3y2A52"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4616A84A34; Tue, 13 Sep 2022 10:15:36 +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 21BD18494A for ; Tue, 13 Sep 2022 10:15:30 +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 g4so10662487pgc.0 for ; Tue, 13 Sep 2022 01:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=obAv/Gqu3pw6qwDUTMukgU7DL6M41fkV5ZMHL/BIPdI=; b=HF3y2A52Iut7i22Trdvk5fEJnmJOsjlWqttuJqbXHD1f87HfXyB1A+FLQwPmho7X4E Yxq0vqN+eBJ+DRlduOVX1h6df1Q5TJgwdM27A/xFERlE+RiOJo/nMP+ath/4vJYuu+Rj qi20FMlid/OBQiwMlWS+r9nu2qr+eB0ZkMeAyrseQbsKF0Inua1gqJcFKEwRfmm91kMS tkisa9hdwtY1bgGDZdMEcLE+mhG1hyJkLIXfxcuTApbesangbFm7bilbDQZoR+dEnOjo KWd9IuPZCEETS68sD27VuU/xyvIKrYE+H6LKFypKrix7Ohqs+mzfHFvuYqPOH+Kttt6U +9Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=obAv/Gqu3pw6qwDUTMukgU7DL6M41fkV5ZMHL/BIPdI=; b=uUO1bbYa7Bc3TXjHBSrFE2I9o1oPfNFbSG2waUM+uihc8UW9BHnrU0DEn22pV9AgMQ 2IGEonfcKTsoML39zRSxiidgBK79h0ydE5rNoaTDgwF+XeiomCQEBLItgPrWF9E18Phe 6chQ/5f6JjykaCLT6tRYFkVD6p3SkYhv5necwueg9IZCLfkiCA7T/ygZG6UoEiBoaNVu EMEy7GTWcUIaRyMV+q5+0Y6OsoPALyeOeI2PqFRwZXUkO6YIuoSWYJ0/cqk7Fnbn302U Zl+S3xlJ/4epPi0nl8sf8aCWFIqCP1BLfx9Jty16ahaoOCfec0q4d+UGw1ug409TKfDm S6gg== X-Gm-Message-State: ACgBeo0eHFW4ZDMvt6/1Ow9RHSxxmlqkOHtxhw6rZSz9cKArqBkGRIjd 4hT12afboE6BZjp1x4jCmknwSZn0anE= X-Google-Smtp-Source: AA6agR4Q6B47q8AXOZjPxb6a44lTBxPadqKd11u2W4o01+bFLUxJ8ZigSSmUrnev4GBoXj7ri+9MgA== X-Received: by 2002:a05:6a00:2789:b0:531:c43:6290 with SMTP id bd9-20020a056a00278900b005310c436290mr31612376pfb.21.1663056928214; Tue, 13 Sep 2022 01:15:28 -0700 (PDT) Received: from caret (p83d5ae91.tokynt01.ap.so-net.ne.jp. [131.213.174.145]) by smtp.gmail.com with ESMTPSA id k17-20020a170902c41100b0016ed20eacd2sm1006987plk.150.2022.09.13.01.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 01:15:27 -0700 (PDT) Date: Tue, 13 Sep 2022 17:15:25 +0900 From: Takumi Sueda To: Simon Glass Cc: U-Boot Mailing List , Anatolij Gustschin Subject: Re: [PATCH] video: simplefb: Add rotation support Message-ID: <20220913081525.GB6440@caret> References: <20220912063326.13033-1-puhitaku@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 On Mon, Sep 12, 2022 at 07:34:38AM -0600, Simon Glass wrote: > On Mon, 12 Sept 2022 at 06:15, Takumi Sueda wrote: > > > > 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__); > > log_debug() > > This is a driver so should not print messages > > > + return -EINVAL; > > You can use > > return log_msg_ret("rot", -EINVAL) > > if you like, since then it could be logged when > CONFIG_LOG_ERROR_RETURN is enabled. > > > + } > > > > format = fdt_getprop(blob, node, "format", NULL); > > debug("%s: %dx%d@%s\n", __func__, uc_priv->xsize, uc_priv->ysize, format); > > -- > > 2.20.1 > > > > Regards, > Simon Hi Simon, thanks for the review. The printf() was copied from the next error return, but the method you proposed me sounds better for debugging since printf() is uncontrollable. I'll send a v2 patch later. Thanks again, Takumi