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 F2D84C433EF for ; Wed, 9 Mar 2022 19:39:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C54B1837E4; Wed, 9 Mar 2022 20:39:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="rU4G5Emp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D46F7836B8; Wed, 9 Mar 2022 20:39:24 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8E4A5837E4 for ; Wed, 9 Mar 2022 20:39:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 09F64B82396; Wed, 9 Mar 2022 19:39:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 845A0C340FF; Wed, 9 Mar 2022 19:37:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646854673; bh=+ISU1EbVyFxO9zKfbF/HL3i4ZoZ+uOwVYWYOxWttQTE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rU4G5EmpFcbb91hH1/NN6m26WE4pDCyBqnk0udL23RYO95qzThiq5y2NafEYgpEPT uGLiw5NtaxwM2FqikZURoZS9YvLxdqvd9yUycmo7a+0m047ydvBRoQzuLRA1zYFtpF MLSb/J1kAnWi/wqWbZDybZwie49u6HrOrVXkDrwD/u6b4eU1A2U42punyxhSl3bA4X BIUwmRafWz1QUBggSb3BB9xrCDEkNviFxC5FczN1ioJAE0b0kH79yUM3ImfISaiAbA ODj/KdhEqd4eiOV8bdN605xak1NTuyqLIHr7sfN96XRmcSf61ZaEx+fEAFUHG290+5 y8JAa4cWZi0lA== Received: by pali.im (Postfix) id 8EC542191; Wed, 9 Mar 2022 20:37:50 +0100 (CET) Date: Wed, 9 Mar 2022 20:37:50 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Simon Glass Cc: Anatolij Gustschin , Tom Rini , U-Boot Mailing List , maemo-leste@lists.dyne.org Subject: Re: [PATCH] Nokia RX-51: Convert to CONFIG_DM_VIDEO Message-ID: <20220309193750.ftzc33qfldoxsed3@pali> References: <20220216204219.18539-1-pali@kernel.org> <20220306150843.22804-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 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.5 at phobos.denx.de X-Virus-Status: Clean On Sunday 06 March 2022 11:43:21 Simon Glass wrote: > On Sun, 6 Mar 2022 at 08:09, Pali Rohár wrote: > > -/* > > - * Routine: video_hw_init > > - * Description: Set up the GraphicDevice depending on sys_boot. > > - */ > > -void *video_hw_init(void) > > +static int rx51_video_probe(struct udevice *dev) > > { > > - /* fill in Graphic Device */ > > - gdev.frameAdrs = 0x8f9c0000; > > - gdev.winSizeX = 800; > > - gdev.winSizeY = 480; > > - gdev.gdfBytesPP = 2; > > - gdev.gdfIndex = GDF_16BIT_565RGB; > > - memset((void *)gdev.frameAdrs, 0, 0xbb800); > > - return (void *) &gdev; > > + struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev); > > + struct video_priv *uc_priv = dev_get_uclass_priv(dev); > > + > > + uc_plat->base = 0x8f9c0000; > > How is this calculated? I do not remember. This seems to be fixed address set by the code which loads U-Boot. I do not have any notes about this stuff. > > + uc_plat->size = 800 * 480 * sizeof(u16); > > More correctly this should be in the bind() method, but in fact I > don't think it matters. We can always adjust it later if needed. Ok. I let it in probe, so all initialization is done at one place. If something is needed to adjust, it can be done later.