From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Fri, 22 May 2020 17:09:09 +0200 Subject: [PATCH 12/26] video: Add helpers for vidconsole for the copy framebuffer In-Reply-To: <20200519231058.19945-13-sjg@chromium.org> References: <20200519231058.19945-1-sjg@chromium.org> <20200519231058.19945-13-sjg@chromium.org> Message-ID: <20200522170909.386e1296@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Tue, 19 May 2020 17:10:44 -0600 Simon Glass sjg at chromium.org wrote: > Add a convenience function to call video_sync_copy() for a vidconsole. > Also add a memmove() helper, which does the memmove() as well as the sync. > > Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin Nit below ... > +int vidconsole_memmove(struct udevice *dev, void *dst, const void *src, > + int size) > +{ > + int ret; > + > + memmove(dst, src, size); > + ret = vidconsole_sync_copy(dev, dst, dst + size); > + if (ret) > + return ret; here we can also do return vidconsole_sync_copy(dev, dst, dst + size); > + > + return 0; > +} > +#endif