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 D4937EB64DA for ; Fri, 16 Jun 2023 10:53:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 41CD586272; Fri, 16 Jun 2023 12:53:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="na+tyjFY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 920C88623A; Fri, 16 Jun 2023 12:52:56 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 7957586103 for ; Fri, 16 Jun 2023 12:52:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35GAqpo8075004; Fri, 16 Jun 2023 05:52:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686912771; bh=gNS+2vUuDSg9dC1bFXjf/1b7CXjthBH9NBbKO3Kmob4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=na+tyjFYF0J/yoIWVI3Cs3o2V8pxvbmirCmhqoWvBVTBDF+LXSj0s1M5bBYNDx1TM 3hyF17S7DrdDLICOwg+oRhyRzNCQp5aGyNkndeYRlDIjf9t2Y4JdkU4N7Acjqe6Ddl HqhllxutAaQfVt8aLCpYj3K2/JfL8ybCkYS+XP7E= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35GAqpDD056565 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 16 Jun 2023 05:52:51 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 16 Jun 2023 05:52:50 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 16 Jun 2023 05:52:50 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35GAqniI001854; Fri, 16 Jun 2023 05:52:50 -0500 From: Nikhil M Jain To: CC: , , , , , Subject: [PATCH V4 4/9] include: video: Reserve video using blob Date: Fri, 16 Jun 2023 16:22:33 +0530 Message-ID: <20230616105238.192823-5-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230616105238.192823-1-n-jain1@ti.com> References: <20230616105238.192823-1-n-jain1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.8 at phobos.denx.de X-Virus-Status: Clean Add method to reserve video framebuffer information using blob, received from previous stage. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass --- V4: - No change. V3: - Add Reviewed-by tag. V2: - Remove #if CONFIG_IS_ENABLED(VIDEO) in video_reserve_from_blob. drivers/video/video-uclass.c | 11 +++++++++++ include/video.h | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 1b66a8061a..497ebd9acf 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -142,6 +142,17 @@ int video_reserve(ulong *addrp) return 0; } +int video_reserve_from_bloblist(struct video_handoff *ho) +{ + gd->video_bottom = ho->fb; + gd->fb_base = ho->fb; + gd->video_top = ho->fb + ho->size; + debug("Reserving %luk for video using blob at: %08x\n", + ((unsigned long)ho->size) >> 10, (u32)ho->fb); + + return 0; +} + int video_fill(struct udevice *dev, u32 colour) { struct video_priv *priv = dev_get_uclass_priv(dev); diff --git a/include/video.h b/include/video.h index fffaae84e5..bdf1cf7855 100644 --- a/include/video.h +++ b/include/video.h @@ -390,4 +390,13 @@ int bmp_display(ulong addr, int x, int y); */ int bmp_info(ulong addr); +/* + * video_reserve_from_bloblist()- Reserve frame-buffer memory for video devices + * using blobs. + * + * @ho: video information passed from SPL + * Returns: 0 (always) + */ +int video_reserve_from_bloblist(struct video_handoff *ho); + #endif -- 2.34.1