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 6129FC7EE2E for ; Fri, 9 Jun 2023 11:52:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 90D23861AC; Fri, 9 Jun 2023 13:51:57 +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="LtPv+IFm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E8578619C; Fri, 9 Jun 2023 13:51:52 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 BCA2786181 for ; Fri, 9 Jun 2023 13:51:42 +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 lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 359Bpec5026860; Fri, 9 Jun 2023 06:51:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686311500; bh=CbX5JDqkjAoZwZD0wJoGhU4Vwmw5IudfDN8F3kYDdaQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LtPv+IFm8Ppk2SEjMeP2QFgzrOquz0AhV6TkuCJvj3gGUpVzFljUa0gG3JxWWdxkY K82CG3Qvg2RuFFh6BarcbpzqLrdc6gQ2nP5ujTxm1RSxdtuiy5cFGh85Txo4DwHnA6 kFlYj2dTxMzi7Z/RbVHmN9/UlPkBeuv2Q63z06QI= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 359BpeE9045881 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Jun 2023 06:51:40 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 9 Jun 2023 06:51:39 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE110.ent.ti.com (157.170.170.21) 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, 9 Jun 2023 06:51:39 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 359BpcI1067103; Fri, 9 Jun 2023 06:51:39 -0500 From: Nikhil M Jain To: CC: , , , , , Subject: [PATCH V2 4/8] include: video: Reserve video using blob Date: Fri, 9 Jun 2023 17:21:18 +0530 Message-ID: <20230609115122.14791-5-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609115122.14791-1-n-jain1@ti.com> References: <20230609115122.14791-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, recieved from previous stage. Signed-off-by: Nikhil M Jain --- 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 8396bdfb11..68ce681bb9 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 18ed159b8d..5f3010d641 100644 --- a/include/video.h +++ b/include/video.h @@ -389,4 +389,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