From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38D9E3E51CC for ; Thu, 23 Apr 2026 09:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776937502; cv=none; b=OHnDz2sfym7DXWXaz7ZoIn8jlXyxc98GSW0NYc8+fzw8HnTu/ESiKsRnU7mO56byDkilwvIZwzRQe+qUeoe7WxOUAXgvco0mIeFb4oBviG31IdH2+f/4QHrtj8Hff7qgV+zyJJt1TMnUrj7upmUGS8he0gOHrSJ1xEv0LddiXh0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776937502; c=relaxed/simple; bh=oBZicjDRrquUQ0wEX/5+s9gcGJ9JAuUGp67SuLJaUIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WvdJgGpzpodofrk16219MfqiMVFsPPMa9vLNKNYu8xOIKRpnn5CGR41uzr7AL2I03NmnkQ0BB0yeaFdWppjQyHbyBtVbl5T6K6rflOI7mNYQ1gWZyTDcTTIFgCvC98ltnCYCOtUnRZmDcPDoNoOzVvJqZbqoix/o6u7EK714kOI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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 smtp-out2.suse.de (Postfix) with ESMTPS id 8A6DB5BCF8; Thu, 23 Apr 2026 09:44:59 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 497BC593A3; Thu, 23 Apr 2026 09:44:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qP2AEBvq6Wk+QwAAD6G6ig (envelope-from ); Thu, 23 Apr 2026 09:44:59 +0000 From: Thomas Zimmermann To: inki.dae@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, airlied@gmail.com, simona@ffwll.ch, dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 2/5] drm/exynos: fbdev: Inline exynos_drm_fbdev_update() Date: Thu, 23 Apr 2026 11:37:47 +0200 Message-ID: <20260423094452.32665-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423094452.32665-1-tzimmermann@suse.de> References: <20260423094452.32665-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 8A6DB5BCF8 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: Inline exynos_drm_fbdev_update() into its only caller. Prepares the code for using DRM client buffers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 35 ++++++----------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index d283ded266d5..1c564edd497e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -54,26 +54,6 @@ static const struct fb_ops exynos_drm_fb_ops = { .fb_destroy = exynos_drm_fb_destroy, }; -static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, - struct drm_fb_helper_surface_size *sizes, - struct exynos_drm_gem *exynos_gem) -{ - struct fb_info *fbi = helper->info; - struct drm_framebuffer *fb = helper->fb; - unsigned int size = fb->width * fb->height * fb->format->cpp[0]; - - fbi->fbops = &exynos_drm_fb_ops; - - drm_fb_helper_fill_info(fbi, helper, sizes); - - fbi->flags |= FBINFO_VIRTFB; - fbi->screen_buffer = exynos_gem->kvaddr; - fbi->screen_size = size; - fbi->fix.smem_len = size; - - return 0; -} - static const struct drm_fb_helper_funcs exynos_drm_fbdev_helper_funcs = { }; @@ -82,6 +62,7 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper, { struct exynos_drm_gem *exynos_gem; struct drm_device *dev = helper->dev; + struct fb_info *info = helper->info; struct drm_mode_fb_cmd2 mode_cmd = { 0 }; unsigned long size; int ret; @@ -115,15 +96,17 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper, } helper->funcs = &exynos_drm_fbdev_helper_funcs; - ret = exynos_drm_fbdev_update(helper, sizes, exynos_gem); - if (ret < 0) - goto err_destroy_framebuffer; + info->fbops = &exynos_drm_fb_ops; + + drm_fb_helper_fill_info(info, helper, sizes); + + info->flags |= FBINFO_VIRTFB; + info->screen_buffer = exynos_gem->kvaddr; + info->screen_size = size; + info->fix.smem_len = size; return 0; -err_destroy_framebuffer: - drm_framebuffer_cleanup(helper->fb); - helper->fb = NULL; err_destroy_gem: exynos_drm_gem_destroy(exynos_gem); return ret; -- 2.53.0