From patchwork Tue Dec 15 14:19:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1416472 X-Patchwork-Delegate: agust@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=NBrq5LEH; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CwL485Dtmz9sTL for ; Wed, 16 Dec 2020 01:19:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8580D8299C; Tue, 15 Dec 2020 15:19:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="NBrq5LEH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D71B28298B; Tue, 15 Dec 2020 15:19:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) (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 0CADC82985 for ; Tue, 15 Dec 2020 15:19:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x641.google.com with SMTP id lt17so27925914ejb.3 for ; Tue, 15 Dec 2020 06:19:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oZbunrT0sx8srpmWeW6Q49/ZCZVMMsFAfwzsIz5gYqY=; b=NBrq5LEH71AKOcthZ7/Sf8DBX7DAodpKalfVZLB1yPJsC/NFVzhsRIx9kcnpbgT0zB pRmVzp2jtkmRQyPldZh4q1oH090ru49DhCmUIzMcwSt4F5hppPNHpDwwHnnLyo9gmp/X qSQvtJiBUe5/MGX/7Tks7ZgPjGjhZqJ0t1zbSVlI3Id55GeYSREH3j0p0t+pNBaE8DOk 0YBDNfq7dYkw0LyW6cCGuV1uhcOkI9Q6MmvnS65SCY1hsFi1horyLhviLkiM0GGNqISu jOnK7ABVKBLX2NkD8myul4tI2KTxDiASCOYZiKUiTS7eSqxux1tg/Evv9uJupdFm9wEq 49ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=oZbunrT0sx8srpmWeW6Q49/ZCZVMMsFAfwzsIz5gYqY=; b=U/PzeR+5lMidjuZ36X9gYIWTnu6absXJefYYhsjvGwQUK4jTh0h0s809neaLsw/pJH vnHYsQSp5lBK76sUPz/cG2fUpfg46m6meYbCy8WHW2OV3hqMeDkgNswq4WOsytCNGRUa YLCWoc+VH/SKdhkJ3iwXB1MPcFIlokeLDkMrYkRcV4mxwlhPEC9OMl3yFhWfAr8afRom bcDEybkZZCUk7y3h9TykqxG4s1tJNJZkP23n7sWEwnF9LxL71BHIHm+OP5owU1ocA3Zr jp+ciSBod6JLS73dPKYSW3ZkfXtkTkc0RT0rWhHBBHIz8oS/ItqkACPcKXTnuUdkRgGn MZSw== X-Gm-Message-State: AOAM532Ba2gSbtdDcW9+gQE2hWfFd0MpL1snscMlhHCHwdUt2hFZXxGj kshdgwxC2VP/HVdU0/PJdXFavQuyHsim2STN X-Google-Smtp-Source: ABdhPJw8SOzSC3lBCNKNNlxbBCymbJaUtv2tFj/D7UTQ1OBIqbiC8Pcu/D0XERFYP5nNiiUKL36lXQ== X-Received: by 2002:a17:906:aeda:: with SMTP id me26mr2065929ejb.11.1608041954458; Tue, 15 Dec 2020 06:19:14 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id ld2sm1497018ejb.73.2020.12.15.06.19.13 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Dec 2020 06:19:13 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, vikhyat.goyal@xilinx.com, Simon Glass Cc: Anatolij Gustschin Subject: [PATCH v3 1/6] video: Fix video sync kernel-doc format Date: Tue, 15 Dec 2020 15:19:02 +0100 Message-Id: <646642309497502e607f8c3afabcc29041ab0317.1608041943.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Place description below function parameters to make kernel-doc stript happy. Also rename dev to vid to be aligned with function parameters. Fixes: 1acafc73bfc7 ("dm: video: Add a video uclass") Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - New patch is series ./scripts/kernel-doc -v -man include/video.h > /dev/null --- include/video.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/video.h b/include/video.h index 9d09d2409af6..7313b17f7ce8 100644 --- a/include/video.h +++ b/include/video.h @@ -151,13 +151,13 @@ int video_clear(struct udevice *dev); /** * video_sync() - Sync a device's frame buffer with its hardware * + * @vid: Device to sync + * @force: True to force a sync even if there was one recently (this is + * very expensive on sandbox) + * * Some frame buffers are cached or have a secondary frame buffer. This * function syncs these up so that the current contents of the U-Boot frame * buffer are displayed to the user. - * - * @dev: Device to sync - * @force: True to force a sync even if there was one recently (this is - * very expensive on sandbox) */ void video_sync(struct udevice *vid, bool force); From patchwork Tue Dec 15 14:19:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1416473 X-Patchwork-Delegate: agust@denx.de 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=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=I7O/nQay; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CwL4R35VKz9sS8 for ; Wed, 16 Dec 2020 01:19:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4F2D82998; Tue, 15 Dec 2020 15:19:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="I7O/nQay"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E6B9B82994; Tue, 15 Dec 2020 15:19:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) (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 D13AC82980 for ; Tue, 15 Dec 2020 15:19:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x644.google.com with SMTP id b9so2979354ejy.0 for ; Tue, 15 Dec 2020 06:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FRHhG8FQTkmtqtxag0bBjhA7FkBvTLPx8xyp3jKKqb4=; b=I7O/nQayDsGPhzGLCSneXnhTIJtvIGywwnI7f4JTOTyKJo2ppqVwOOoQvlpnU1HyDy SIIYEDpbEEhRXyyPVGa5zdIkVX/Rs5C3zU7y1DYh/5tlbPW8WrE+U5sXSCCzA1su917r I4tPjX01iXpuBB3h32fN9gVCJ6RoKr6NZRuUE86ZGuwis8BIXDHj8NYN4A77xY/xJ6E7 BWnsyqrJIYTqzqBRuQr6TeXb6TCP0AJciWN6ETjBD3N1my8NOlN37jhA64QQfG3d9/vN 7pURAau2VMmS5MEXYK9EMozmvn9V20mpvb44ysvA2ACWTxUMKkGu+lb3L4JhODGfh9It Ix0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FRHhG8FQTkmtqtxag0bBjhA7FkBvTLPx8xyp3jKKqb4=; b=gunqOnEk3q2zmr/alKSpaiQzN9nWx8EnrcUw22/+WH2nJd4o6vp41XmrjnoXSYF3DK pKoOqMrWqNm8SQGSnNdwmUN7vZczL9NnpK6Ean99xNfYAMulchOO1Ht/uW8Yng62QkZb dxczFYXDYvekar/vn65YCT33Bj1+t6W4pBJ+jEBx25azDhgkH37NxeKrORXg/uwXjPxd abltezjNuB1PGxzkzovB7B8+XEd0bdlRyd71Owte18bM29H6Rf26njwrB71CmY06T2Ug vO0/+5TXyXezFljlxZwqVdWeIqNod9xb6pAZ1suk9C4ehOP2ga1e9a7uXgj7IzPX/8O2 1SOg== X-Gm-Message-State: AOAM5325je8zvNvtOaEXpCEiuFj0cKSNRNo3OVyPAwSuwjjkpdgBg08X 6BaFumyVd9svDgsLF8ag+b5iUv+ywh6r+hql X-Google-Smtp-Source: ABdhPJwNauqPnZQfKfHCzsQjtlVIEb26UXJCFtYBkpEpwgskIippzxdfZbUZQZX6a0QqMYi9xP2hzA== X-Received: by 2002:a17:906:f949:: with SMTP id ld9mr27551803ejb.401.1608041956178; Tue, 15 Dec 2020 06:19:16 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id k18sm18312451edx.18.2020.12.15.06.19.15 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Dec 2020 06:19:15 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, vikhyat.goyal@xilinx.com, Simon Glass Cc: Anatolij Gustschin Subject: [PATCH v3 2/6] video: Let video_sync to return error value Date: Tue, 15 Dec 2020 15:19:03 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean This patch is preparation for follow up one to support cases where synchronization can fail. Suggested-by: Simon Glass Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v3: - also fix video_bmp call. Changes in v2: - New patch is series drivers/video/vidconsole-uclass.c | 40 ++++++++++++++++++++++--------- drivers/video/video-uclass.c | 12 +++++++--- drivers/video/video_bmp.c | 5 +--- include/video.h | 4 +++- 4 files changed, 42 insertions(+), 19 deletions(-) diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index 3a07f36ce278..f29c0e58c76d 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -89,9 +89,7 @@ static int vidconsole_back(struct udevice *dev) if (priv->ycur < 0) priv->ycur = 0; } - video_sync(dev->parent, false); - - return 0; + return video_sync(dev->parent, false); } /* Move to a newline, scrolling the display if necessary */ @@ -101,7 +99,7 @@ static void vidconsole_newline(struct udevice *dev) struct udevice *vid_dev = dev->parent; struct video_priv *vid_priv = dev_get_uclass_priv(vid_dev); const int rows = CONFIG_CONSOLE_SCROLL_LINES; - int i; + int i, ret; priv->xcur_frac = priv->xstart_frac; priv->ycur += priv->y_charsize; @@ -116,7 +114,12 @@ static void vidconsole_newline(struct udevice *dev) } priv->last_ch = 0; - video_sync(dev->parent, false); + ret = video_sync(dev->parent, false); + if (ret) { +#ifdef DEBUG + console_puts_select_stderr(true, "[vc err: video_sync]"); +#endif + } } static const struct vid_rgb colors[VID_COLOR_COUNT] = { @@ -348,8 +351,15 @@ static void vidconsole_escape_char(struct udevice *dev, char ch) parsenum(priv->escape_buf + 1, &mode); if (mode == 2) { + int ret; + video_clear(dev->parent); - video_sync(dev->parent, false); + ret = video_sync(dev->parent, false); + if (ret) { +#ifdef DEBUG + console_puts_select_stderr(true, "[vc err: video_sync]"); +#endif + } priv->ycur = 0; priv->xcur_frac = priv->xstart_frac; } else { @@ -565,7 +575,12 @@ static void vidconsole_putc(struct stdio_dev *sdev, const char ch) console_puts_select_stderr(true, "[vc err: putc]"); #endif } - video_sync(dev->parent, false); + ret = video_sync(dev->parent, false); + if (ret) { +#ifdef DEBUG + console_puts_select_stderr(true, "[vc err: video_sync]"); +#endif + } } static void vidconsole_puts(struct stdio_dev *sdev, const char *s) @@ -582,7 +597,12 @@ static void vidconsole_puts(struct stdio_dev *sdev, const char *s) console_puts_select_stderr(true, str); #endif } - video_sync(dev->parent, false); + ret = video_sync(dev->parent, false); + if (ret) { +#ifdef DEBUG + console_puts_select_stderr(true, "[vc err: video_sync]"); +#endif + } } /* Set up the number of rows and colours (rotated drivers override this) */ @@ -691,9 +711,7 @@ static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc, for (s = argv[1]; *s; s++) vidconsole_put_char(dev, *s); - video_sync(dev->parent, false); - - return 0; + return video_sync(dev->parent, false); } U_BOOT_CMD( diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 650891e49dd0..6fc412801714 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_SANDBOX @@ -172,7 +173,7 @@ void video_set_default_colors(struct udevice *dev, bool invert) } /* Flush video activity to the caches */ -void video_sync(struct udevice *vid, bool force) +int video_sync(struct udevice *vid, bool force) { /* * flush_dcache_range() is declared in common.h but it seems that some @@ -196,17 +197,22 @@ void video_sync(struct udevice *vid, bool force) last_sync = get_timer(0); } #endif + return 0; } void video_sync_all(void) { struct udevice *dev; + int ret; for (uclass_find_first_device(UCLASS_VIDEO, &dev); dev; uclass_find_next_device(&dev)) { - if (device_active(dev)) - video_sync(dev, true); + if (device_active(dev)) { + ret = video_sync(dev, true); + if (ret) + dev_dbg(dev, "Video sync failed\n"); + } } } diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c index 5a4d12c68d4e..66de22318f2b 100644 --- a/drivers/video/video_bmp.c +++ b/drivers/video/video_bmp.c @@ -379,8 +379,5 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, if (ret) return log_ret(ret); - video_sync(dev, false); - - return 0; + return video_sync(dev, false); } - diff --git a/include/video.h b/include/video.h index 7313b17f7ce8..1bfe6843a805 100644 --- a/include/video.h +++ b/include/video.h @@ -155,11 +155,13 @@ int video_clear(struct udevice *dev); * @force: True to force a sync even if there was one recently (this is * very expensive on sandbox) * + * @return: 0 always + * * Some frame buffers are cached or have a secondary frame buffer. This * function syncs these up so that the current contents of the U-Boot frame * buffer are displayed to the user. */ -void video_sync(struct udevice *vid, bool force); +int video_sync(struct udevice *vid, bool force); /** * video_sync_all() - Sync all devices' frame buffers with there hardware From patchwork Tue Dec 15 14:19:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1416475 X-Patchwork-Delegate: agust@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=aiX+EnCx; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CwL4d2PvBz9sSC for ; Wed, 16 Dec 2020 01:20:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E8BEF829A4; Tue, 15 Dec 2020 15:19:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="aiX+EnCx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E36AB82998; Tue, 15 Dec 2020 15:19:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) (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 C899E8298C for ; Tue, 15 Dec 2020 15:19:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x644.google.com with SMTP id g20so27950627ejb.1 for ; Tue, 15 Dec 2020 06:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nIwsd+4UeObTe1qpJLag11MOCbyyaNVyRJBtYUvyZD8=; b=aiX+EnCxfvw2BMQGpD4zTXOjsBmWc4cNZMolSP50HRGxsyK5o1NliWxrzGP48uFP60 hVJoMg0AP7z9GdpxNiFrQrwG5MtuawZMuv30xgSBPVZtZXmnkrxslUEcxhn6/WOyOUpx uHE7ro0Jbsz5TQfdOVNUVig07ya2KahC4TFF5BS/mPjbKYR/5CFMdp0evSnTeV3M1XIu yOQ4ffXiNzR88q8CVWWbx9OQfQ6YEVcftl31MTVoD60wWlA8/Xnb8zXWrWxWCOK9wjST YJU4VHslEBrnG9bm+FQSu+7s0kt5En0PDsS7BqSZkN/OEjktt1/71ZS71fAFN+B8FTpC DVUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=nIwsd+4UeObTe1qpJLag11MOCbyyaNVyRJBtYUvyZD8=; b=ZDywGL6Qt46zCSbp5CpMBMPjcBg/Qtfeo6hvnh+9D6JNE26SA0S7DHfLdyGDp+Ug8Y TnfGZZP7CP9lfT7F5UkAWqJHxepAUiiZEnk8LGF6J0/xzE3tDdlGXzARREUz1S36t9lM 9IA6bbmLN62Yeow0H1ER54kNYJD7sFLhy/8di/Ii8i2XXLby1LtlTK0TK5aub/uvxIxH nW5c2W7ZdV9NDCjbXdGIAZFuzylTU1y6Xn/30dgIxFDz9Lh8EYeAU69FH2Zcid8e3GMz pmnldTGNgJGIYtqmgg1N7VAkUTqlXAQPFT2KjN2/vDP7TRLAoCb0qmSN4IDvCEOPRQYP 3VYg== X-Gm-Message-State: AOAM531JauYZxc92KcKZ7FS3LU6ZOEiX+ZiDqETzOWCTMHCaZdy9/FNB 8V9IlYHf0PAimkkaoQ/MaLfG5VAuCetIj0ZZ X-Google-Smtp-Source: ABdhPJzpWWlyAbw67rDImePaF9Oq0+0uhS94RWMbCinyD8h3Vc/ljvMKJ/5iIYMUBvU37GrEZNlGIQ== X-Received: by 2002:a17:906:76cd:: with SMTP id q13mr26126282ejn.67.1608041958166; Tue, 15 Dec 2020 06:19:18 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id b7sm1521089ejp.5.2020.12.15.06.19.17 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Dec 2020 06:19:17 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, vikhyat.goyal@xilinx.com, Simon Glass Cc: Anatolij Gustschin Subject: [PATCH v3 3/6] video: Introduce video_sync operation Date: Tue, 15 Dec 2020 15:19:04 +0100 Message-Id: <670179a2ec5d3ad735e4a2018b63c308a6378f0f.1608041943.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Some drivers like LCD connected via SPI requires explicit sync function which copy framebuffer content over SPI to controller to display. This hook doesn't exist yet that's why introduce it via video operations. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - Add support for returning value - Update kernel-doc format to pass kernel-doc script - Update patch subject s/call/operation/ Simon: Please review this. I didn't find existing way how this can be done that's why I am introducing this hook. Also maybe name can be named a little bit differently. That's why waiting for better suggestion. --- drivers/video/video-uclass.c | 9 +++++++++ include/video.h | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 6fc412801714..938e7d371311 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -175,6 +175,15 @@ void video_set_default_colors(struct udevice *dev, bool invert) /* Flush video activity to the caches */ int video_sync(struct udevice *vid, bool force) { + struct video_ops *ops = video_get_ops(vid); + int ret; + + if (ops && ops->video_sync) { + ret = ops->video_sync(vid); + if (ret) + return ret; + } + /* * flush_dcache_range() is declared in common.h but it seems that some * architectures do not actually implement it. Is there a way to find diff --git a/include/video.h b/include/video.h index 1bfe6843a805..12fc525ab4ef 100644 --- a/include/video.h +++ b/include/video.h @@ -114,8 +114,16 @@ struct video_priv { u8 bg_col_idx; }; -/* Placeholder - there are no video operations at present */ +/** + * struct video_ops - structure for keeping video operations + * @video_sync: Synchronize FB with device. Some device like SPI based LCD + * displays needs synchronization when data in an FB is available. + * For these devices implement video_sync hook to call a sync + * function. vid is pointer to video device udevice. Function + * should return 0 on success video_sync and error code otherwise + */ struct video_ops { + int (*video_sync)(struct udevice *vid); }; #define video_get_ops(dev) ((struct video_ops *)(dev)->driver->ops) @@ -155,7 +163,7 @@ int video_clear(struct udevice *dev); * @force: True to force a sync even if there was one recently (this is * very expensive on sandbox) * - * @return: 0 always + * @return: 0 on success, error code otherwise * * Some frame buffers are cached or have a secondary frame buffer. This * function syncs these up so that the current contents of the U-Boot frame From patchwork Tue Dec 15 14:19:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1416476 X-Patchwork-Delegate: agust@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=KaT5ZGGy; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CwL4v5xKYz9sSn for ; Wed, 16 Dec 2020 01:20:15 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 130F7829A9; Tue, 15 Dec 2020 15:19:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="KaT5ZGGy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2C4F48299A; Tue, 15 Dec 2020 15:19:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) (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 7752D8298E for ; Tue, 15 Dec 2020 15:19:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x643.google.com with SMTP id jx16so27889716ejb.10 for ; Tue, 15 Dec 2020 06:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kh0+FXviklHfJ/m+aPZNkG4D3YXQu1/udyp55rpc+14=; b=KaT5ZGGyzrySMlG48bw5REcRYRNpgRmd5CNA2Jpc8KrdtGWV/08Ml6XcsIg0KBuYOP Q+LeRTopWUG0M+1MEI+jWwNomUNAKpFCQTmbJW/oC2mNrHpSOKD6q4EUxDy9CuqiUxtD PxqxmeRdySeKeWuzKat+8kxLGNxTFTOS7q37hFQkr4e60u6d+g6Kf89gJ2XMG5EbbU08 yWBB+c3dOqjfYIqct+hefa0rCQFXV8+v9lH456nt+N6d7Krus+2ImTveXgeubbQmfDK2 DKL+5xOeCgC2kXV8m97Rwf/Bo7zPvwxdF2ww8bepq1a+5GrJjI6VX9v9H8YN/ho+dQBX yDeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kh0+FXviklHfJ/m+aPZNkG4D3YXQu1/udyp55rpc+14=; b=KOUWzRQZ/6M+mP6SKv7j7F+hxx3SLQQcppidmMqQ/7miTvDFxqwm62w9XdjjaIbEAv IVT5fFtQRP4yaOB3yjqKcT98/zYo9Sd2kDaaqG7uqxB5JuuGTVPCqIOeGry9nuqOlW9W kM1T6hJRC8Eij3Xi/uQMxQ/v2/sV5hk/QSbRcYoFDs3dv/1ihz1Tj2emTK+8r0y198gi KYDW/rgoLEHKDNcaU8/jaFwkd5ux4eue67ZzKnIce/RUdGc+s6iBnA8T7IDn2L+xFODE VCCyyILzuCsDQt9Nr04QqkbGxR7TWmKartACud7sri9QDlh2ogx0orIIe2b343vQXkc8 62fQ== X-Gm-Message-State: AOAM532obC/hg7KvL3B/SoUh9fv0YpvFwt4ruuWzLwAIQeFkjJ5yqRDt T3zMHXqsFUkl6SPraKUX+TcS1/N4DBPPDhHL X-Google-Smtp-Source: ABdhPJyZVBExyVdA75c/CecqeLVB8Pm1kdJkw2ddK7s97ClKpG9+Gx43qzVuEyCNYvgrDV6D83YWYw== X-Received: by 2002:a17:906:a115:: with SMTP id t21mr26758392ejy.549.1608041959861; Tue, 15 Dec 2020 06:19:19 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id i8sm18006881eds.72.2020.12.15.06.19.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Dec 2020 06:19:19 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, vikhyat.goyal@xilinx.com, Simon Glass Cc: Alex Nemirovsky , Anastasiia Lukianenko , Anatolij Gustschin , Christophe Leroy , Heinrich Schuchardt , Lokesh Vutla , Masahiro Yamada , Michal Simek , Patrice Chotard , Rayagonda Kokatanur , Robert Marko , Sam Protsenko , Sean Anderson , Stefan Bosch Subject: [PATCH v3 4/6] video: seps525: Add dt binding description Date: Tue, 15 Dec 2020 15:19:05 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean From: Vikhyat Goyal Added dt binding for seps525 display driver. Signed-off-by: Vikhyat Goyal Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- (no changes since v1) MAINTAINERS | 1 + .../video/syncoam,seps525.txt | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 doc/device-tree-bindings/video/syncoam,seps525.txt diff --git a/MAINTAINERS b/MAINTAINERS index 127e30c0a5e0..11857ece9a53 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -547,6 +547,7 @@ S: Maintained T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git F: arch/arm/mach-zynq/ F: doc/board/xilinx/ +F: doc/device-tree-bindings/video/syncoam,seps525.txt F: drivers/clk/clk_zynq.c F: drivers/fpga/zynqpl.c F: drivers/gpio/zynq_gpio.c diff --git a/doc/device-tree-bindings/video/syncoam,seps525.txt b/doc/device-tree-bindings/video/syncoam,seps525.txt new file mode 100644 index 000000000000..e1e0db9d71fb --- /dev/null +++ b/doc/device-tree-bindings/video/syncoam,seps525.txt @@ -0,0 +1,24 @@ +spi based seps525 framebuffer display driver + +Driver for seps525 display controller (in spi mode), This binding supports selection +of spi chipselect, spi max frequency, gpio to drive dc and reset pin of seps525 +controller and spi transaction bit length. + +Required properties: +- compatible: "syncoam,seps525" +- reg: Specifies the chip-select the seps525 is connected to on the spi bus +- reset-gpios: gpio connected to reset pin of seps525 controller. +- dc-gpios: gpio connected to dc pin of seps525 controller: +- buswidth: bitlength of each spi transaction + +Example: + displayspi@0 { + compatible = "syncoam,seps525"; + reg = <0>; + spi-max-frequency = <10000000>; + spi-cpol; + spi-cpha; + buswidth = <8>; + reset-gpios = <&gpio 0x1c GPIO_ACTIVE_LOW>; + dc-gpios = <&gpio 0x1b GPIO_ACTIVE_HIGH>; + }; From patchwork Tue Dec 15 14:19:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1416477 X-Patchwork-Delegate: agust@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=I9FAd8mO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CwL5C1lsZz9sSn for ; Wed, 16 Dec 2020 01:20:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CC26829A1; Tue, 15 Dec 2020 15:19:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="I9FAd8mO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E00A829A2; Tue, 15 Dec 2020 15:19:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (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 5F31582997 for ; Tue, 15 Dec 2020 15:19:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x543.google.com with SMTP id b2so21215811edm.3 for ; Tue, 15 Dec 2020 06:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gl9a10YzqS+xMJQt1JF6XHHSdEhI0rL/Q4P1MIQTxCo=; b=I9FAd8mOLTyWNwHTM0Xa9cNquzHuTqh1vhYMUbKQx9Ttt/ART1M2farxlIL/sPBTr0 McgDorV2s+gNQ8zqDIBzOsBi+Jw6FLUGPzQM8uaQAHWgzeDcGRdZpZ1RlxHbokg1Q2Hv 52KkfIN0kC4efnMa5KfrIBV8AGJIfsrdIHKp3D1SYzlu5JmSJcWAzpPN6OxY0B9dYG4L 6oRnx7GJslzGlXWxorOs9X1aLu3ODv2S7x9ewEFbR5hE+3d1tfdYJLxhYCHsj0++Uq2/ wB9jOhSc2qsmrZlsxSL2DqbCokJUFfNACX+spXHirt/eIYAi7cI75oyYfmwl4a7Ml6yz t6Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Gl9a10YzqS+xMJQt1JF6XHHSdEhI0rL/Q4P1MIQTxCo=; b=S9al0cl+vaXSEOlWgFtuWjZqcJzi3LBV4eP70Tlk3Of9Dw3dZe77Nf57ZR6entVlbV xt65OF/UgqTtv3CO+soDEE3NQCRd20MQpfjus+S1rPK22msU4YajNtRrDNZ59fnUrEtu ZCTCYPVbOzLq1jqHMNo9lplwNPTIwtx8kR9mxVhx8vw6+Ei1pf/Ybxtd+LRcAUQ1lLm4 suB165T/irQUtFBe+Y514n0xOJuaEd0aPIlyY2FAmyc9K8OlDve51th68+5rUNgGZvKP fMvmNWYN1T89WWtEVxrfS35hNsOg10u2oYuTDLzFF7gWuaKVArtNwJ5TS5LFNs8ZvXN8 BjuA== X-Gm-Message-State: AOAM531UGIgHNIVIQOEwYK/riB08PAX9QNejVGfkGb7u7sgUD7n3X15J HZhr85HHqp6SbTYuu9KgMog3PX8usAgiOtQk X-Google-Smtp-Source: ABdhPJxypzN7uEfwmtfqSrjs+xsge0w5qvC6NVOj1odYjgM0C1WXT/i3WRwzwpSWoTpYHM093n5R5Q== X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr16058283eds.328.1608041961582; Tue, 15 Dec 2020 06:19:21 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id s12sm18714875edu.28.2020.12.15.06.19.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Dec 2020 06:19:20 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, vikhyat.goyal@xilinx.com, Simon Glass Cc: Alex Nemirovsky , Anatolij Gustschin , Christophe Leroy , Heinrich Schuchardt , Lokesh Vutla , Masahiro Yamada , Patrice Chotard , Rayagonda Kokatanur , Robert Marko , Sam Protsenko , Sean Anderson , Stefan Bosch Subject: [PATCH v3 5/6] video: seps525: Add seps525 SPI driver Date: Tue, 15 Dec 2020 15:19:06 +0100 Message-Id: <76dc435e420bc3e7cf1945e93f098d01e676e1d6.1608041943.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean Add support for the WiseChip Semiconductor Inc. (UG-6028GDEBF02) display using the SEPS525 (Syncoam) LCD Controller. Syncoam Seps525 PM-Oled is RGB 160x128 display. This driver has been tested through zynq-spi driver. ZynqMP> load mmc 1 100000 rainbow.bmp 61562 bytes read in 20 ms (2.9 MiB/s) ZynqMP> bmp info 100000 Image size : 160 x 128 Bits per pixel: 24 Compression : 0 ZynqMP> bmp display 100000 ZynqMP> setenv stdout vidconsole Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v3: - use 32bit reg/value parameters Changes in v2: - Fix Kconfig entry and use VIDEO_SEPS525 instead of SEPS525 and fix location - Add kernel-doc structure for seps525_priv structure - Remove flags variable and use macros directly MAINTAINERS | 1 + drivers/video/Kconfig | 7 + drivers/video/Makefile | 1 + drivers/video/seps525.c | 327 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 336 insertions(+) create mode 100644 drivers/video/seps525.c diff --git a/MAINTAINERS b/MAINTAINERS index 11857ece9a53..847b63685a29 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -589,6 +589,7 @@ F: drivers/spi/zynq_qspi.c F: drivers/spi/zynq_spi.c F: drivers/timer/cadence-ttc.c F: drivers/usb/host/ehci-zynq.c +F: drivers/video/seps525.c F: drivers/watchdog/cdns_wdt.c F: include/zynqmppl.h F: include/zynqmp_firmware.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 998271b9b628..71363409f04e 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -652,6 +652,13 @@ config VIDEO_NX HDMI. This option enables this support which can be used on devices which have an eDP display connected. +config VIDEO_SEPS525 + bool "Enable video support for Seps525" + depends on DM_VIDEO + help + Enable support for the Syncoam PM-OLED display driver (RGB 160x128). + Currently driver is supporting only SPI interface. + source "drivers/video/nexell/Kconfig" config VIDEO diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 67a492a2d60d..9db96aa891a3 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_VIDEO_SIMPLE) += simplefb.o obj-$(CONFIG_VIDEO_TEGRA20) += tegra.o obj-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o obj-$(CONFIG_VIDEO_VESA) += vesa.o +obj-$(CONFIG_VIDEO_SEPS525) += seps525.o obj-y += bridge/ obj-y += sunxi/ diff --git a/drivers/video/seps525.c b/drivers/video/seps525.c new file mode 100644 index 000000000000..369e5e6afc87 --- /dev/null +++ b/drivers/video/seps525.c @@ -0,0 +1,327 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * FB driver for the WiseChip Semiconductor Inc. (UG-6028GDEBF02) display + * using the SEPS525 (Syncoam) LCD Controller + * + * Copyright (C) 2020 Xilinx Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define WIDTH 160 +#define HEIGHT 128 + +#define SEPS525_INDEX 0x00 +#define SEPS525_STATUS_RD 0x01 +#define SEPS525_OSC_CTL 0x02 +#define SEPS525_IREF 0x80 +#define SEPS525_CLOCK_DIV 0x03 +#define SEPS525_REDUCE_CURRENT 0x04 +#define SEPS525_SOFT_RST 0x05 +#define SEPS525_DISP_ONOFF 0x06 +#define SEPS525_PRECHARGE_TIME_R 0x08 +#define SEPS525_PRECHARGE_TIME_G 0x09 +#define SEPS525_PRECHARGE_TIME_B 0x0A +#define SEPS525_PRECHARGE_CURRENT_R 0x0B +#define SEPS525_PRECHARGE_CURRENT_G 0x0C +#define SEPS525_PRECHARGE_CURRENT_B 0x0D +#define SEPS525_DRIVING_CURRENT_R 0x10 +#define SEPS525_DRIVING_CURRENT_G 0x11 +#define SEPS525_DRIVING_CURRENT_B 0x12 +#define SEPS525_DISPLAYMODE_SET 0x13 +#define SEPS525_RGBIF 0x14 +#define SEPS525_RGB_POL 0x15 +#define SEPS525_MEMORY_WRITEMODE 0x16 +#define SEPS525_MX1_ADDR 0x17 +#define SEPS525_MX2_ADDR 0x18 +#define SEPS525_MY1_ADDR 0x19 +#define SEPS525_MY2_ADDR 0x1A +#define SEPS525_MEMORY_ACCESS_POINTER_X 0x20 +#define SEPS525_MEMORY_ACCESS_POINTER_Y 0x21 +#define SEPS525_DDRAM_DATA_ACCESS_PORT 0x22 +#define SEPS525_GRAY_SCALE_TABLE_INDEX 0x50 +#define SEPS525_GRAY_SCALE_TABLE_DATA 0x51 +#define SEPS525_DUTY 0x28 +#define SEPS525_DSL 0x29 +#define SEPS525_D1_DDRAM_FAC 0x2E +#define SEPS525_D1_DDRAM_FAR 0x2F +#define SEPS525_D2_DDRAM_SAC 0x31 +#define SEPS525_D2_DDRAM_SAR 0x32 +#define SEPS525_SCR1_FX1 0x33 +#define SEPS525_SCR1_FX2 0x34 +#define SEPS525_SCR1_FY1 0x35 +#define SEPS525_SCR1_FY2 0x36 +#define SEPS525_SCR2_SX1 0x37 +#define SEPS525_SCR2_SX2 0x38 +#define SEPS525_SCR2_SY1 0x39 +#define SEPS525_SCR2_SY2 0x3A +#define SEPS525_SCREEN_SAVER_CONTEROL 0x3B +#define SEPS525_SS_SLEEP_TIMER 0x3C +#define SEPS525_SCREEN_SAVER_MODE 0x3D +#define SEPS525_SS_SCR1_FU 0x3E +#define SEPS525_SS_SCR1_MXY 0x3F +#define SEPS525_SS_SCR2_FU 0x40 +#define SEPS525_SS_SCR2_MXY 0x41 +#define SEPS525_MOVING_DIRECTION 0x42 +#define SEPS525_SS_SCR2_SX1 0x47 +#define SEPS525_SS_SCR2_SX2 0x48 +#define SEPS525_SS_SCR2_SY1 0x49 +#define SEPS525_SS_SCR2_SY2 0x4A + +/* SEPS525_DISPLAYMODE_SET */ +#define MODE_SWAP_BGR BIT(7) +#define MODE_SM BIT(6) +#define MODE_RD BIT(5) +#define MODE_CD BIT(4) + +/** + * struct seps525_priv - Private structure + * @reset_gpio: Reset gpio pin + * @dc_gpio: Data/command control gpio pin + * @dev: Device uclass for video_ops + */ +struct seps525_priv { + struct gpio_desc reset_gpio; + struct gpio_desc dc_gpio; + struct udevice *dev; +}; + +static int seps525_spi_write_cmd(struct udevice *dev, u32 reg) +{ + struct seps525_priv *priv = dev_get_priv(dev); + u8 buf8 = reg; + int ret; + + ret = dm_gpio_set_value(&priv->dc_gpio, 0); + if (ret) { + dev_dbg(dev, "Failed to handle dc\n"); + return ret; + } + + ret = dm_spi_xfer(dev, 8, &buf8, NULL, SPI_XFER_BEGIN | SPI_XFER_END); + if (ret) + dev_dbg(dev, "Failed to write command\n"); + + return ret; +} + +static int seps525_spi_write_data(struct udevice *dev, u32 val) +{ + struct seps525_priv *priv = dev_get_priv(dev); + u8 buf8 = val; + int ret; + + ret = dm_gpio_set_value(&priv->dc_gpio, 1); + if (ret) { + dev_dbg(dev, "Failed to handle dc\n"); + return ret; + } + + ret = dm_spi_xfer(dev, 8, &buf8, NULL, SPI_XFER_BEGIN | SPI_XFER_END); + if (ret) + dev_dbg(dev, "Failed to write data\n"); + + return ret; +} + +static void seps525_spi_write(struct udevice *dev, u32 reg, u32 val) +{ + (void)seps525_spi_write_cmd(dev, reg); + (void)seps525_spi_write_data(dev, val); +} + +static int seps525_display_init(struct udevice *dev) +{ + /* Disable Oscillator Power Down */ + seps525_spi_write(dev, SEPS525_REDUCE_CURRENT, 0x03); + mdelay(5); + + /* Set Normal Driving Current */ + seps525_spi_write(dev, SEPS525_REDUCE_CURRENT, 0x00); + mdelay(5); + + seps525_spi_write(dev, SEPS525_SCREEN_SAVER_CONTEROL, 0x00); + /* Set EXPORT1 Pin at Internal Clock */ + seps525_spi_write(dev, SEPS525_OSC_CTL, 0x01); + /* Set Clock as 120 Frames/Sec */ + seps525_spi_write(dev, SEPS525_CLOCK_DIV, 0x90); + /* Set Reference Voltage Controlled by External Resister */ + seps525_spi_write(dev, SEPS525_IREF, 0x01); + + /* precharge time R G B */ + seps525_spi_write(dev, SEPS525_PRECHARGE_TIME_R, 0x04); + seps525_spi_write(dev, SEPS525_PRECHARGE_TIME_G, 0x05); + seps525_spi_write(dev, SEPS525_PRECHARGE_TIME_B, 0x05); + + /* precharge current R G B (uA) */ + seps525_spi_write(dev, SEPS525_PRECHARGE_CURRENT_R, 0x9D); + seps525_spi_write(dev, SEPS525_PRECHARGE_CURRENT_G, 0x8C); + seps525_spi_write(dev, SEPS525_PRECHARGE_CURRENT_B, 0x57); + + /* driving current R G B (uA) */ + seps525_spi_write(dev, SEPS525_DRIVING_CURRENT_R, 0x56); + seps525_spi_write(dev, SEPS525_DRIVING_CURRENT_G, 0x4D); + seps525_spi_write(dev, SEPS525_DRIVING_CURRENT_B, 0x46); + /* Set Color Sequence */ + seps525_spi_write(dev, SEPS525_DISPLAYMODE_SET, 0x00); + /* Set MCU Interface Mode */ + seps525_spi_write(dev, SEPS525_RGBIF, 0x01); + /* Set Memory Write Mode */ + seps525_spi_write(dev, SEPS525_MEMORY_WRITEMODE, 0x66); + /* 1/128 Duty (0x0F~0x7F) */ + seps525_spi_write(dev, SEPS525_DUTY, 0x7F); + /* Set Mapping RAM Display Start Line (0x00~0x7F) */ + seps525_spi_write(dev, SEPS525_DSL, 0x00); + /* Display On (0x00/0x01) */ + seps525_spi_write(dev, SEPS525_DISP_ONOFF, 0x01); + /* Set All Internal Register Value as Normal Mode */ + seps525_spi_write(dev, SEPS525_SOFT_RST, 0x00); + /* Set RGB Interface Polarity as Active Low */ + seps525_spi_write(dev, SEPS525_RGB_POL, 0x00); + + /* Enable access for data */ + (void)seps525_spi_write_cmd(dev, SEPS525_DDRAM_DATA_ACCESS_PORT); + + return 0; +} + +static int seps525_spi_startup(struct udevice *dev) +{ + struct seps525_priv *priv = dev_get_priv(dev); + int ret; + + ret = dm_gpio_set_value(&priv->reset_gpio, 1); + if (ret) + return ret; + + ret = dm_gpio_set_value(&priv->reset_gpio, 0); + if (ret) + return ret; + + ret = dm_spi_claim_bus(dev); + if (ret) { + dev_err(dev, "Failed to claim SPI bus: %d\n", ret); + return ret; + } + + ret = seps525_display_init(dev); + if (ret) + return ret; + + dm_spi_release_bus(dev); + + return 0; +} + +static int seps525_sync(struct udevice *vid) +{ + struct video_priv *uc_priv = dev_get_uclass_priv(vid); + struct seps525_priv *priv = dev_get_priv(vid); + struct udevice *dev = priv->dev; + int i, ret; + u8 data1, data2; + u8 *start = uc_priv->fb; + + ret = dm_spi_claim_bus(dev); + if (ret) { + dev_err(dev, "Failed to claim SPI bus: %d\n", ret); + return ret; + } + + /* start position X,Y */ + seps525_spi_write(dev, SEPS525_MEMORY_ACCESS_POINTER_X, 0); + seps525_spi_write(dev, SEPS525_MEMORY_ACCESS_POINTER_Y, 0); + + /* Enable access for data */ + (void)seps525_spi_write_cmd(dev, SEPS525_DDRAM_DATA_ACCESS_PORT); + + for (i = 0; i < (uc_priv->xsize * uc_priv->ysize); i++) { + data2 = *start++; + data1 = *start++; + (void)seps525_spi_write_data(dev, data1); + (void)seps525_spi_write_data(dev, data2); + } + + dm_spi_release_bus(dev); + + return 0; +} + +static int seps525_probe(struct udevice *dev) +{ + struct video_priv *uc_priv = dev_get_uclass_priv(dev); + struct seps525_priv *priv = dev_get_priv(dev); + u32 buswidth; + int ret; + + buswidth = dev_read_u32_default(dev, "buswidth", 0); + if (buswidth != 8) { + dev_err(dev, "Only 8bit buswidth is supported now"); + return -EINVAL; + } + + ret = gpio_request_by_name(dev, "reset-gpios", 0, + &priv->reset_gpio, GPIOD_IS_OUT); + if (ret) { + dev_err(dev, "missing reset GPIO\n"); + return ret; + } + + ret = gpio_request_by_name(dev, "dc-gpios", 0, + &priv->dc_gpio, GPIOD_IS_OUT); + if (ret) { + dev_err(dev, "missing dc GPIO\n"); + return ret; + } + + uc_priv->bpix = VIDEO_BPP16; + uc_priv->xsize = WIDTH; + uc_priv->ysize = HEIGHT; + uc_priv->rot = 0; + + priv->dev = dev; + + ret = seps525_spi_startup(dev); + if (ret) + return ret; + + return 0; +} + +static int seps525_bind(struct udevice *dev) +{ + struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + + plat->size = WIDTH * HEIGHT * 16; + + return 0; +} + +static const struct video_ops seps525_ops = { + .video_sync = seps525_sync, +}; + +static const struct udevice_id seps525_ids[] = { + { .compatible = "syncoam,seps525" }, + { } +}; + +U_BOOT_DRIVER(seps525_video) = { + .name = "seps525_video", + .id = UCLASS_VIDEO, + .of_match = seps525_ids, + .ops = &seps525_ops, + .platdata_auto_alloc_size = sizeof(struct video_uc_platdata), + .bind = seps525_bind, + .probe = seps525_probe, + .priv_auto_alloc_size = sizeof(struct seps525_priv), +}; From patchwork Tue Dec 15 14:19:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1416478 X-Patchwork-Delegate: agust@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=rsHlxsr0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CwL5Q3VGrz9sRK for ; Wed, 16 Dec 2020 01:20:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4E82E829AC; Tue, 15 Dec 2020 15:19:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="rsHlxsr0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE3A2829A6; Tue, 15 Dec 2020 15:19:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (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 DB5C182999 for ; Tue, 15 Dec 2020 15:19:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x543.google.com with SMTP id p22so21147623edu.11 for ; Tue, 15 Dec 2020 06:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FQrx7GU9730pUIs/lViZmJho5mnm/VIoooaI0+8ZYWI=; b=rsHlxsr0UuNkI4zmrgDiHjiqqHuiKIEsD3mA3ZIJfpkSRnlp5vNZ64m6i2WB2iV9qz nprRfQCrTzIiN4LETkdzWQlRewqd6MXMJIK/TK+5esZR5NBnqv/PKSMx03Gv4IFiCiwo 3dchIRt7lJa1Mw87UU8s5yOphJXOtHfYvIh7u7fWUy3oNThakwwUxjU13s5eXhEeCb1+ Pm9RzoHx4vW/6Dq3Sp/yPfoYhQKK7HgKewwfIpBkXWH/yiJavT4cwnwVhgrrhHTRcmpf 8YyWkhMPNK94l8EFbgyEIjXT8grqJeak3TGHGaq7ry8e/kroWxy08edZY/OPYw2dtenr IS5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FQrx7GU9730pUIs/lViZmJho5mnm/VIoooaI0+8ZYWI=; b=ouX78heB0xRvA/4quw5x0qVa2jdvuQGY/tQqGmz+Awa5xJoGNVIb+ooi2m7scKOv/J /a6Of003VJp8AEUbwJ4Etcq3B4GRhuWQolnNkD7tww0GmYAPYcuQLga+iv0ngXXlVXt7 kxNN0dnYSSPiba0c0DqnC0T6kQfjNaKZQkZK903V0wFkbJTxqHc8daGOZ80I2GSEiTN7 N8voFORUqRfVMydMebO2aC7+pb86IXgYBiD6ONwpI64d6MnEsu3u+9ElsyJsAGvOc7XJ 5iv3bEEgZ9loodWty1RoHMDWNiRokr7vuY2MPJhirQytDls/UUwIn7tKgzr0H7MLsjpz CMTA== X-Gm-Message-State: AOAM533mMstlbo4TyPgrvJW/vBBEiL8RV3BF4dMweHquypyD6ZuTEuiT 5xTwTmvZ5bFd4vuMgSJbdMTYMRLbjKanZvk8 X-Google-Smtp-Source: ABdhPJwC+5IS5TYvk3LG2k2xXEgvO37cAYWL42DGUuQiZIn0LRnd7oC0x8c0E8Ecm/wS2wIoGI0PoA== X-Received: by 2002:a05:6402:c95:: with SMTP id cm21mr29659428edb.294.1608041963257; Tue, 15 Dec 2020 06:19:23 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id w20sm18758681edi.12.2020.12.15.06.19.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Dec 2020 06:19:22 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, vikhyat.goyal@xilinx.com, Simon Glass Cc: Anatolij Gustschin Subject: [PATCH v3 6/6] video: Call video_sync in video_clear() Date: Tue, 15 Dec 2020 15:19:07 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean There is a need to call sync when anybody asking for clearing display. For example via cls command. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v3: - new patch in this series drivers/video/video-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 938e7d371311..21452a1cda97 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -143,7 +143,7 @@ int video_clear(struct udevice *dev) if (ret) return ret; - return 0; + return video_sync(dev, false); } void video_set_default_colors(struct udevice *dev, bool invert)