From patchwork Tue Mar 12 15:44:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590153 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 5CC0E7BAF2; Tue, 12 Mar 2024 15:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258521; cv=none; b=pLr2TPn6IjbryPHij7euEphKZX1980aj3z3LEUsL44YxgqbSbxEcU5RE8FM6I7K8bLyjt3DWZ7qO+WCza1folO9MxWIHjrRpS7t39qJRiw+RRUWa6BNeQRXOa0xp1GIcO60Ap84kas2c+lv8lnw/FqIelulqvo09lYx/77hAf2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258521; c=relaxed/simple; bh=wpgopbB62sFldbjuFA5kUOaW7CVCS1jiUU+P27+/40Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LHPVw4e4cdKbdt9frtkYmXWCly7BtjUYSpFRwdjv9jt1MxW9Jc+jYIve2bW/2xPkrJOmGJfzIgNPYNrSPFnoeKRaXCxs6Afl/f84hiLtFSDUujlGO0XTUK3YYo96NRrEDDf+PUWbdEKeKOhpeI2kPasRWMdKQE/Wcx7H/5u2rQk= 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.130 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-out1.suse.de (Postfix) with ESMTPS id 74BCC37871; Tue, 12 Mar 2024 15:48:37 +0000 (UTC) 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 224D213976; Tue, 12 Mar 2024 15:48:37 +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 8HH7BlV58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:37 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Zack Rusin , Maarten Lankhorst , Maxime Ripard , stable@vger.kernel.org Subject: [PATCH 01/43] drm/fbdev-generic: Do not set physical framebuffer address Date: Tue, 12 Mar 2024 16:44:56 +0100 Message-ID: <20240312154834.26178-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 74BCC37871 X-Spam-Flag: NO Framebuffer memory is allocated via vmalloc() from non-contiguous physical pages. The physical framebuffer start address is therefore meaningless. Do not set it. The value is not used within the kernel and only exported to userspace on dedicated ARM configs. No functional change is expected. Signed-off-by: Thomas Zimmermann Fixes: a5b44c4adb16 ("drm/fbdev-generic: Always use shadow buffering") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Zack Rusin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: # v6.4+ Reviewed-by: Javier Martinez Canillas Reviewed-by: Zack Rusin Reviewed-by: Sui Jingfeng Tested-by: Sui Jingfeng --- drivers/gpu/drm/drm_fbdev_generic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c index d647d89764cb9..b4659cd6285ab 100644 --- a/drivers/gpu/drm/drm_fbdev_generic.c +++ b/drivers/gpu/drm/drm_fbdev_generic.c @@ -113,7 +113,6 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper, /* screen */ info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; info->screen_buffer = screen_buffer; - info->fix.smem_start = page_to_phys(vmalloc_to_page(info->screen_buffer)); info->fix.smem_len = screen_size; /* deferred I/O */ From patchwork Tue Mar 12 15:44:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590155 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 9BA5B7C6E0 for ; Tue, 12 Mar 2024 15:48:39 +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=1710258521; cv=none; b=XOgJffKnNnBawiV8Aht5JEAGsp14mj6ElFPBqbbl4b53xRLb1nFiKdPkmLgnz9xC+pwcZziYfiaFcA4WGNXZq/SGltuy0veNxV3QSjp2qYeG0UuNq9RRbhBZyar1y4jSC/TEAWQjqcpextyW3yDZUKxgcUqsS9ZKPdtXQsBXFnw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258521; c=relaxed/simple; bh=qc8J7Uv2fSJ3sf9SzQroAdZMXrWVNeNcZ/15lRH94bQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lUjVcpYGnmoYTo+oAM8N9hhKVl+Ou48A/M/Qs6/7QndTSsXeZ+PheXC0aAik+7ctCRWUAXYe2txVhKZsUW44TCzS5QEE8/Sv3ZnE52QzTWr0sYiQ30Zq7XenxpZMCTprN2F4WETolhqYgE1+9I4sHUYeUPWOzFmVWeyfnTRm7C0= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jMh2K97B; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=/UxMd7WG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jMh2K97B; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=/UxMd7WG; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jMh2K97B"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/UxMd7WG"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jMh2K97B"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/UxMd7WG" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 B6A965D6C7; Tue, 12 Mar 2024 15:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258517; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SZcylyw3XLvuCP1s/00N8ZWC2q+lq3BDpPGQ/zHVbVc=; b=jMh2K97BxFWk6o3ED2/ormqgu+SRZTD5AY2vOVVRaBR649wu917/WRb0yDrHsY/8KIYSPY 2RQFaTOqRHicggQ5Sb6Ky6Zl4V4yFrcyDzfzALeXPtqJcxyMFU0OkvlWu+UchubqYacFxy 9OTp1dh/tQMEs64sitZZqBxICkxoj4I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258517; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SZcylyw3XLvuCP1s/00N8ZWC2q+lq3BDpPGQ/zHVbVc=; b=/UxMd7WGzMugX1CdNrAu376eyCKSSJsDh3zVQvEIsWN2s9PzpraF9tfqgIrysx1LCAI0yj VUvDase6Bf4HxBDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258517; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SZcylyw3XLvuCP1s/00N8ZWC2q+lq3BDpPGQ/zHVbVc=; b=jMh2K97BxFWk6o3ED2/ormqgu+SRZTD5AY2vOVVRaBR649wu917/WRb0yDrHsY/8KIYSPY 2RQFaTOqRHicggQ5Sb6Ky6Zl4V4yFrcyDzfzALeXPtqJcxyMFU0OkvlWu+UchubqYacFxy 9OTp1dh/tQMEs64sitZZqBxICkxoj4I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258517; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SZcylyw3XLvuCP1s/00N8ZWC2q+lq3BDpPGQ/zHVbVc=; b=/UxMd7WGzMugX1CdNrAu376eyCKSSJsDh3zVQvEIsWN2s9PzpraF9tfqgIrysx1LCAI0yj VUvDase6Bf4HxBDg== 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 7CF0B1364F; Tue, 12 Mar 2024 15:48:37 +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 YL/rHFV58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:37 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 02/43] fbdev/deferred-io: Move pageref setup into separate helper Date: Tue, 12 Mar 2024 16:44:57 +0100 Message-ID: <20240312154834.26178-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: 0.90 X-Spam-Flag: NO Set up struct fb_deferred_io_pageref in th new helper function fb_deferred_io_pageref_lookup(), which runs when the pageref is first taken. Remove the setup code from the rest of the code. At first, the code allocates the memory of all pageref structs. The setup of the various fields happens when the pageref is required. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fb_defio.c | 42 ++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index dae96c9f61cf8..bff1e300ed6bb 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -36,20 +36,43 @@ static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs return page; } +static struct fb_deferred_io_pageref *fb_deferred_io_pageref_lookup(struct fb_info *info, + unsigned long offset, + struct page *page) +{ + unsigned long pgoff = offset >> PAGE_SHIFT; + struct fb_deferred_io_pageref *pageref; + + if (fb_WARN_ON_ONCE(info, pgoff >= info->npagerefs)) + return NULL; /* incorrect allocation size */ + + /* 1:1 mapping between pageref and page offset */ + pageref = &info->pagerefs[pgoff]; + + if (pageref->page) + goto out; + + pageref->page = page; + pageref->offset = pgoff << PAGE_SHIFT; + INIT_LIST_HEAD(&pageref->list); + +out: + if (fb_WARN_ON_ONCE(info, pageref->page != page)) + return NULL; /* inconsistent state */ + return pageref; +} + static struct fb_deferred_io_pageref *fb_deferred_io_pageref_get(struct fb_info *info, unsigned long offset, struct page *page) { struct fb_deferred_io *fbdefio = info->fbdefio; struct list_head *pos = &fbdefio->pagereflist; - unsigned long pgoff = offset >> PAGE_SHIFT; struct fb_deferred_io_pageref *pageref, *cur; - if (WARN_ON_ONCE(pgoff >= info->npagerefs)) - return NULL; /* incorrect allocation size */ - - /* 1:1 mapping between pageref and page offset */ - pageref = &info->pagerefs[pgoff]; + pageref = fb_deferred_io_pageref_lookup(info, offset, page); + if (!pageref) + return NULL; /* * This check is to catch the case where a new process could start @@ -60,9 +83,6 @@ static struct fb_deferred_io_pageref *fb_deferred_io_pageref_get(struct fb_info if (!list_empty(&pageref->list)) goto pageref_already_added; - pageref->page = page; - pageref->offset = pgoff << PAGE_SHIFT; - if (unlikely(fbdefio->sort_pagereflist)) { /* * We loop through the list of pagerefs before adding in @@ -264,7 +284,7 @@ int fb_deferred_io_init(struct fb_info *info) { struct fb_deferred_io *fbdefio = info->fbdefio; struct fb_deferred_io_pageref *pagerefs; - unsigned long npagerefs, i; + unsigned long npagerefs; int ret; BUG_ON(!fbdefio); @@ -286,8 +306,6 @@ int fb_deferred_io_init(struct fb_info *info) ret = -ENOMEM; goto err; } - for (i = 0; i < npagerefs; ++i) - INIT_LIST_HEAD(&pagerefs[i].list); info->npagerefs = npagerefs; info->pagerefs = pagerefs; From patchwork Tue Mar 12 15:44:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590154 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 B76C57C6EF for ; Tue, 12 Mar 2024 15:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258521; cv=none; b=G8h4fFvB2xQ/tX6oPzPG0O8oYza1XqA06y24zrjTLzyG6LooHEaWItQpK2htgYj1jUhoMxfrLQC3tTF+4DoD1HzZcACghkE4hjGf6hMeDRsge0z+fHpCYcCxzzW6c7socX4KRHhHpVunnx9POR8SxWS24UCJjTijXZnztUJNhoc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258521; c=relaxed/simple; bh=ARUvc2Uml3BMUHmEo2iovNCEi2mqUPkS/bauV17j1Hk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aRFE/c2682UrXqX5f3/eCx+s2W7RHJjLp+wI0I8sJp9XiVJ/OJO85peTvOEk4cQ8hdUK2saC6pMiLG85+2TTZ0dL1VXy3l/8BiFCKNnVl7xXjirjNGMRG/5vOPxgLZb8XBhI3ZnFDVh8MdTjfrWDi2VJHCruNNayrHagpz1t8ZI= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RqMcKcZA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=B2/H9PaM; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RqMcKcZA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=B2/H9PaM; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RqMcKcZA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="B2/H9PaM"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RqMcKcZA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="B2/H9PaM" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 05D0237874; Tue, 12 Mar 2024 15:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4iYwrieOkLADkBicbIsw2X7C23nK5mP439QApSR+pM0=; b=RqMcKcZA8CBNMWSXfJ3VbzDUgXxF8ReP35XNsORwdJIDFMdC7Gfjbp4WRZt5WvKpn+dmn9 g0Z+Lb0N1aPc0rJStp359JCHhYlxY4cUdj7x8sPoKSoanLT09nQ7wMgMMFR02oiowTSzx2 bbnvKOj7eeiZZXkU5TRwFyLL2c3ycuk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4iYwrieOkLADkBicbIsw2X7C23nK5mP439QApSR+pM0=; b=B2/H9PaMfpDKkjlG712xLDoDtN9NOIDTy4cVg2l/jYXhPbth89cJlEDYlIW4Gi2S9pw4Kc QWuvVYcxDAjQLBCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4iYwrieOkLADkBicbIsw2X7C23nK5mP439QApSR+pM0=; b=RqMcKcZA8CBNMWSXfJ3VbzDUgXxF8ReP35XNsORwdJIDFMdC7Gfjbp4WRZt5WvKpn+dmn9 g0Z+Lb0N1aPc0rJStp359JCHhYlxY4cUdj7x8sPoKSoanLT09nQ7wMgMMFR02oiowTSzx2 bbnvKOj7eeiZZXkU5TRwFyLL2c3ycuk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4iYwrieOkLADkBicbIsw2X7C23nK5mP439QApSR+pM0=; b=B2/H9PaMfpDKkjlG712xLDoDtN9NOIDTy4cVg2l/jYXhPbth89cJlEDYlIW4Gi2S9pw4Kc QWuvVYcxDAjQLBCQ== 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 BE84913976; Tue, 12 Mar 2024 15:48:37 +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 4FUkLVV58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:37 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 03/43] fbdev/deferred-io: Clean up pageref on lastclose Date: Tue, 12 Mar 2024 16:44:58 +0100 Message-ID: <20240312154834.26178-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[24.69%] X-Spam-Flag: NO Clean up the pageref state as part of the lastclose helper. This only requirs to clear the page's mapping field. The pageref and page can stay in place for the next opened instance of the frame- buffer file. With the change in the clean-up logic, here's no further need to lookup pages during the lastclose cleanup. The code instead uses the existing pagerefs in its look-up table. It also avoids using smem_len, which some driver might not set correctly. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fb_defio.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index bff1e300ed6bb..f23b1cbe67192 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -62,6 +62,14 @@ static struct fb_deferred_io_pageref *fb_deferred_io_pageref_lookup(struct fb_in return pageref; } +static void fb_deferred_io_pageref_clear(struct fb_deferred_io_pageref *pageref) +{ + struct page *page = pageref->page; + + if (page) + page->mapping = NULL; +} + static struct fb_deferred_io_pageref *fb_deferred_io_pageref_get(struct fb_info *info, unsigned long offset, struct page *page) @@ -330,16 +338,13 @@ EXPORT_SYMBOL_GPL(fb_deferred_io_open); static void fb_deferred_io_lastclose(struct fb_info *info) { - struct page *page; - int i; + unsigned long i; flush_delayed_work(&info->deferred_work); /* clear out the mapping that we setup */ - for (i = 0 ; i < info->fix.smem_len; i += PAGE_SIZE) { - page = fb_deferred_io_page(info, i); - page->mapping = NULL; - } + for (i = 0; i < info->npagerefs; ++i) + fb_deferred_io_pageref_clear(&info->pagerefs[i]); } void fb_deferred_io_release(struct fb_info *info) From patchwork Tue Mar 12 15:44:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590159 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 E207E7CF04 for ; Tue, 12 Mar 2024 15:48:39 +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=1710258522; cv=none; b=HtHKp0ANL8o44kd7n54Poc2DnBWEbOJ8OqX1tOtioVSs535irZwY7nFebGYXiI1tFvLU6R8gLLnrvnaLL46dM9XtRsCjJnovy+O6IVmT7j12XYrce3m8WcA0f84E3gx0S4kKPBq3MJBuSEvyGMZzfwEaLU8/ouXMcB0mpEGaUVU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258522; c=relaxed/simple; bh=pSeSEM5EenKYDM7GUT5f3npuboMWf0rW+YUgTZXIyi8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N6ZYyzLEKSguhTh0Lc2QfOykx9B0v5LHfSkjEtEUNM8+r9ULwtNCMj4Pyy3b6MmjBdwlR1tIa0qmcnrEq+pOFfzSoyobcqkVjFoxMwxgmobcugf8u62fvm66RMdFxIEWqgDQCZC7mF+Dhl1m51sFc6GWJoIbCPKZ1RP4PdoM/ZM= 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 479085D6C8; Tue, 12 Mar 2024 15:48:38 +0000 (UTC) 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 0C6CD1364F; Tue, 12 Mar 2024 15:48:38 +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 uOulAVZ58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:38 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 04/43] fbdev/deferred-io: Test screen_buffer for vmalloc'ed memory Date: Tue, 12 Mar 2024 16:44:59 +0100 Message-ID: <20240312154834.26178-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 479085D6C8 X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Framebuffers in virtual memory are available via screen_buffer. Use it instead of screen_base and avoid the type casting. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fb_defio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index f23b1cbe67192..b38f775cd39dd 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -25,11 +25,11 @@ static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs) { - void *screen_base = (void __force *) info->screen_base; + const void *screen_buffer = info->screen_buffer; struct page *page; - if (is_vmalloc_addr(screen_base + offs)) - page = vmalloc_to_page(screen_base + offs); + if (is_vmalloc_addr(screen_buffer + offs)) + page = vmalloc_to_page(screen_buffer + offs); else page = pfn_to_page((info->fix.smem_start + offs) >> PAGE_SHIFT); From patchwork Tue Mar 12 15:45:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590156 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 685E27C6F0 for ; Tue, 12 Mar 2024 15:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258522; cv=none; b=uYi53We6BOX7lvl9aVy5AzMXzDhRx5Feno41yAwiqMsvHQ8WD7+8kJrYCmD9MdaD9U9UkfOYiZqLrZeHjx3ySGsjF6aJt/JqwPK/ivPSIwOPKgHgmLqZ2lfHRh4A7BIxxAZhRSTTsdySmtg+rxbLV9q4/dMpKLV1RA+gjbuwuKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258522; c=relaxed/simple; bh=YwhQpNixaMuZZkqm6e25evyLDZJhsyCyeTtxDpFsy2U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OhxeWcPaO6ZY1HDHGUdN+IfwCf6tlz1kn7EcJz+L1Kbs1gKNEJoPIRJ75yvsE4GwpmCX0zs8muxj67/aFnUHptXNkq1EQ9BFu2Vc1qv6NAVdX+Fzhf5HfpcIwFOM8+mzH1VyDgsOLnYjo2nCuyqrmE+XgZB3VsE5Sauj+2QeLr0= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=n3lEUqo+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=U80IhNzN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=n3lEUqo+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=U80IhNzN; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="n3lEUqo+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="U80IhNzN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="n3lEUqo+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="U80IhNzN" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 88F9337876; Tue, 12 Mar 2024 15:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1QnMdUxfi0xN/eOzVELWrTkxojcelKMPil/HGmRkpxM=; b=n3lEUqo+JZtGTNygIAYo7JDerQ+r6zINgsfLPhI3XfNlqd4neO1FjS2s0tlxdm6xa2hVSX kZvBic92Q4H7gdJc7tw8I/T316ff/UpmGo7U5IdDi44K4MIVKLWENFUF46HU6sXU5ls4Y+ /Jje2vEDSflJDALdewSafsMWInmqrTg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1QnMdUxfi0xN/eOzVELWrTkxojcelKMPil/HGmRkpxM=; b=U80IhNzNBIMWc9MH4HQMF/b2JP/yBppzvRXKnIWXIoEt+shO8z9oM+zvhrQvvWwR8byg3x OQleEOwt83F/koAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1QnMdUxfi0xN/eOzVELWrTkxojcelKMPil/HGmRkpxM=; b=n3lEUqo+JZtGTNygIAYo7JDerQ+r6zINgsfLPhI3XfNlqd4neO1FjS2s0tlxdm6xa2hVSX kZvBic92Q4H7gdJc7tw8I/T316ff/UpmGo7U5IdDi44K4MIVKLWENFUF46HU6sXU5ls4Y+ /Jje2vEDSflJDALdewSafsMWInmqrTg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1QnMdUxfi0xN/eOzVELWrTkxojcelKMPil/HGmRkpxM=; b=U80IhNzNBIMWc9MH4HQMF/b2JP/yBppzvRXKnIWXIoEt+shO8z9oM+zvhrQvvWwR8byg3x OQleEOwt83F/koAw== 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 4ED331364F; Tue, 12 Mar 2024 15:48:38 +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 aKXCEVZ58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:38 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 05/43] fbdev/deferred-io: Test smem_start for I/O memory Date: Tue, 12 Mar 2024 16:45:00 +0100 Message-ID: <20240312154834.26178-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.38 X-Spamd-Result: default: False [-0.38 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.08)[63.17%] X-Spam-Flag: NO Test smem_start before looking up pages from its value. Return NULL if it is unset. This will result in a SIGBUS signal. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fb_defio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index b38f775cd39dd..fe84218ded457 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -26,11 +26,11 @@ static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs) { const void *screen_buffer = info->screen_buffer; - struct page *page; + struct page *page = NULL; if (is_vmalloc_addr(screen_buffer + offs)) page = vmalloc_to_page(screen_buffer + offs); - else + else if (info->fix.smem_start) page = pfn_to_page((info->fix.smem_start + offs) >> PAGE_SHIFT); return page; From patchwork Tue Mar 12 15:45:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590158 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 A630E7C6F6 for ; Tue, 12 Mar 2024 15:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258522; cv=none; b=bPQG9UpDpmYHc43raj1jJU67RBXqoFIY616gUxP+cA94rupwvDk/DnB96Eeff2eY9xyaQkOKMMa1s0Nm+qsKJ7H5wHcK4RS1zTnomCmFZ4aBztM4srtUKoNd7GPgRRoe1aOAU/NWlhaAIPNmBHpTI7xcVsZTR0sqtKlc++KpHV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258522; c=relaxed/simple; bh=j6gnAjtRdOw7uG5pwHGGfFhNXDqt++HBmEiff0fNWTA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LvTvPl0ExJMxNnY7bzEiNvqqzKeVg+6pjEklr+bh0nNg1v/QG0qFBoAPsxrT/7kYwGKMbbU8C08IHhotxd4y/iJKEt/kIMVM8331KcOGR5IMekIbZ4QCWK6+1LG8fO/Nsj1W2kF7z19IncDZHGp2vYgUkkubMSxJbdw7nEVNzUI= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gYGAvr1A; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2N3+K+mR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gYGAvr1A; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2N3+K+mR; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gYGAvr1A"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2N3+K+mR"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gYGAvr1A"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2N3+K+mR" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id CB1CB37877; Tue, 12 Mar 2024 15:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PklQcVgrNOaKzshXPJwMN6AoIxJpZP0wEgBnSK9Gf7c=; b=gYGAvr1Am9V+Y63IkgTqtTgNodzRKIawJMBLjCgYbGpedY4pWHBi8yQaGuEqaFVrzuaHoC oHAdWLm+D5JaiYU/uCEpdUoA6e9VH7pO6PRO6ErLE1z+dNOB8tIb0uMHiSgfkRhUxd7Ky1 /Cnvjg425W9m77LmkyRQaTEAPn9tLcg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PklQcVgrNOaKzshXPJwMN6AoIxJpZP0wEgBnSK9Gf7c=; b=2N3+K+mReo0MsMDG+XI94fRp5dtU6PXI6wJNcNlp+YZ144V7gMkd6kXxxlze/R1jpGXVg3 pVk4BaYe8nvk2lAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PklQcVgrNOaKzshXPJwMN6AoIxJpZP0wEgBnSK9Gf7c=; b=gYGAvr1Am9V+Y63IkgTqtTgNodzRKIawJMBLjCgYbGpedY4pWHBi8yQaGuEqaFVrzuaHoC oHAdWLm+D5JaiYU/uCEpdUoA6e9VH7pO6PRO6ErLE1z+dNOB8tIb0uMHiSgfkRhUxd7Ky1 /Cnvjg425W9m77LmkyRQaTEAPn9tLcg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258518; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PklQcVgrNOaKzshXPJwMN6AoIxJpZP0wEgBnSK9Gf7c=; b=2N3+K+mReo0MsMDG+XI94fRp5dtU6PXI6wJNcNlp+YZ144V7gMkd6kXxxlze/R1jpGXVg3 pVk4BaYe8nvk2lAg== 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 90C4B13976; Tue, 12 Mar 2024 15:48:38 +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 yBjfIVZ58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:38 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 06/43] fbdev/deferred-io: Always call get_page() for framebuffer pages Date: Tue, 12 Mar 2024 16:45:01 +0100 Message-ID: <20240312154834.26178-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; URIBL_BLOCKED(0.00)[suse.de:email]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[22.38%] X-Spam-Score: 0.90 X-Spam-Flag: NO Unconditionally call get_page() after looking up a page from the framebuffer memory. Guarantees that we always hold a reference. This change also refactors the code such that it can support a driver-supplied get_page helper. This will be useful for DRM's fbdev emulation. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fb_defio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index fe84218ded457..6e0bbcfdb01b5 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -23,7 +23,7 @@ #include #include -static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs) +static struct page *fb_deferred_io_get_page(struct fb_info *info, unsigned long offs) { const void *screen_buffer = info->screen_buffer; struct page *page = NULL; @@ -33,6 +33,9 @@ static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs else if (info->fix.smem_start) page = pfn_to_page((info->fix.smem_start + offs) >> PAGE_SHIFT); + if (page) + get_page(page); + return page; } @@ -129,12 +132,10 @@ static vm_fault_t fb_deferred_io_fault(struct vm_fault *vmf) if (offset >= info->fix.smem_len) return VM_FAULT_SIGBUS; - page = fb_deferred_io_page(info, offset); + page = fb_deferred_io_get_page(info, offset); if (!page) return VM_FAULT_SIGBUS; - get_page(page); - if (vmf->vma->vm_file) page->mapping = vmf->vma->vm_file->f_mapping; else From patchwork Tue Mar 12 15:45:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590157 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 CD6A97CF00 for ; Tue, 12 Mar 2024 15:48:40 +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=1710258522; cv=none; b=FJOl2EcZ6ZlRIG9K7M0bEYbdefxih297xx991SEshHYvZ1FnJbVnpuL2RGBAy1bm4S/pTHN8EvGWiYAW3b5GN2//JNFOJlsEiLxYp4Dkj3RrLofI9RIebnad96+/STKwS35bQhYqlRXCIjyaNqQ6ybsCNXxRafli9W81OYqWk2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258522; c=relaxed/simple; bh=l4kGS5LGN+6ICO8Kl67wsjt9HxO2rbZt5ahmpRds/HY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I8gg5Ivs4z+LTdYubQasE7w62ZmSpzKKLmXPCxUkvbzI5XWo4HNKP+8EErZeCLECNGknWRSKkAIvbf4OulWb09CxlVCMWD9oiX6FNQLDeNw8pvJ4w5rx1jHJzKMyXUebGtqaduzp9KSDiiORQ4GVVvddxj6fkPlTAUlLDX7uAus= 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 179315D6C9; Tue, 12 Mar 2024 15:48:39 +0000 (UTC) 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 D22831364F; Tue, 12 Mar 2024 15:48:38 +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 6FXqMVZ58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:38 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 07/43] fbdev/deferred-io: Provide get_page hook in struct fb_deferred_io Date: Tue, 12 Mar 2024 16:45:02 +0100 Message-ID: <20240312154834.26178-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 179315D6C9 X-Spam-Flag: NO Add a callback for drivers to provide framebuffer pages to fbdev's deferred-I/O helpers. Implementations need to acquire a reference on the page before returning it. Returning NULL generates a SIGBUS signal. This will be useful for DRM's fbdev emulation with GEM-shemem buffer objects. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fb_defio.c | 4 ++++ include/linux/fb.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index 6e0bbcfdb01b5..51928ff7961a5 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -25,9 +25,13 @@ static struct page *fb_deferred_io_get_page(struct fb_info *info, unsigned long offs) { + struct fb_deferred_io *fbdefio = info->fbdefio; const void *screen_buffer = info->screen_buffer; struct page *page = NULL; + if (fbdefio->get_page) + return fbdefio->get_page(info, offs); + if (is_vmalloc_addr(screen_buffer + offs)) page = vmalloc_to_page(screen_buffer + offs); else if (info->fix.smem_start) diff --git a/include/linux/fb.h b/include/linux/fb.h index 708e6a177b1be..bbb0805c0ab1e 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -219,6 +219,7 @@ struct fb_deferred_io { struct mutex lock; /* mutex that protects the pageref list */ struct list_head pagereflist; /* list of pagerefs for touched pages */ /* callback */ + struct page *(*get_page)(struct fb_info *info, unsigned long offset); void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); }; #endif From patchwork Tue Mar 12 15:45:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590168 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 279907CF01 for ; Tue, 12 Mar 2024 15:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; cv=none; b=l5N+WytKd8L6MHvbGuNzy+mq2a0ZDHtnHEmVuvefuYPz/Q/P6B+AUL/A5nlT4Ngo8Pb7aBa6/C/I4jXsljgbwiiUn3GzfuJXTmNVV845UkRycsqBvaBShxgeHT2ZKfFizCRKxEeFqowdtwhjilPRcWCF7zOfvBq18cPMnQeAWgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; c=relaxed/simple; bh=1VzuTGidJv9WZDZxzj90ThOe0TZDxXomnI8RgSmnt4s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HWmIl3Q207yQsvuG3gMvPvHUdJMjSYP9BGN89dv0EMnrouqHzkawVvPyeMS2vORP4PRZOIBwSNngoKA8w91tH7tz3x8me8brN2QEGcbZJ8fzo2U5+YBXA1xK8smdxmiNlML3PKeyNQMt75A7hpU51Hyzx41ea1DZC+p0BUWdVTs= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AuhxZXAN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eK8BoBqQ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AuhxZXAN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eK8BoBqQ; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AuhxZXAN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eK8BoBqQ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AuhxZXAN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eK8BoBqQ" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 5B5AA37878; Tue, 12 Mar 2024 15:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HO9kh87P1egATeEzfXIrBcBFru7do3Jl08xz5jnkdW4=; b=AuhxZXANHnx7Q7BeWCkBpcFklMxHMiVJt/JlpboD+D2DfoUIRhrWJ0kVvaIorAopnI4MY3 jQpcEltLyemrAElSJSJ3SP8NrjLUowCs/l79y0g8C7HOso5L+eZXvTb2D66YYbwCI3wBef yAx5AkgGZ4aHKu/GqQDLVYh8DdTylAY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HO9kh87P1egATeEzfXIrBcBFru7do3Jl08xz5jnkdW4=; b=eK8BoBqQfRy1xrfzdQ7dFfPyrS1+lpFonfLKNhwmtzI7YzMmTJ6KmFVZ9XkLoFqpDMfTD5 PRPTX+kKyDht63DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HO9kh87P1egATeEzfXIrBcBFru7do3Jl08xz5jnkdW4=; b=AuhxZXANHnx7Q7BeWCkBpcFklMxHMiVJt/JlpboD+D2DfoUIRhrWJ0kVvaIorAopnI4MY3 jQpcEltLyemrAElSJSJ3SP8NrjLUowCs/l79y0g8C7HOso5L+eZXvTb2D66YYbwCI3wBef yAx5AkgGZ4aHKu/GqQDLVYh8DdTylAY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HO9kh87P1egATeEzfXIrBcBFru7do3Jl08xz5jnkdW4=; b=eK8BoBqQfRy1xrfzdQ7dFfPyrS1+lpFonfLKNhwmtzI7YzMmTJ6KmFVZ9XkLoFqpDMfTD5 PRPTX+kKyDht63DQ== 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 1FFAE1364F; Tue, 12 Mar 2024 15:48:39 +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 6HVGBld58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:39 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 08/43] drm/fbdev: Add fbdev-shmem Date: Tue, 12 Mar 2024 16:45:03 +0100 Message-ID: <20240312154834.26178-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-2.10 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; URIBL_BLOCKED(0.00)[suse.de:email]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Score: -2.10 X-Spam-Flag: NO Add an fbdev emulation for SHMEM-based memory managers. The code is similar to fbdev-generic, but does not require an addition shadow buffer for mmap(). Fbdev-shmem operates directly on the buffer object's SHMEM pages. Fbdev's deferred-I/O mechanism updates the hardware state on write operations. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_fbdev_shmem.c | 316 ++++++++++++++++++++++++++++++ include/drm/drm_fbdev_shmem.h | 15 ++ 3 files changed, 332 insertions(+) create mode 100644 drivers/gpu/drm/drm_fbdev_shmem.c create mode 100644 include/drm/drm_fbdev_shmem.h diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index a73c04d2d7a39..50a2f0cffdac2 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -107,6 +107,7 @@ drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o drm_shmem_helper-y := drm_gem_shmem_helper.o +drm_shmem_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_shmem.o obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o drm_suballoc_helper-y := drm_suballoc.o diff --git a/drivers/gpu/drm/drm_fbdev_shmem.c b/drivers/gpu/drm/drm_fbdev_shmem.c new file mode 100644 index 0000000000000..f568efcb198d6 --- /dev/null +++ b/drivers/gpu/drm/drm_fbdev_shmem.c @@ -0,0 +1,316 @@ +// SPDX-License-Identifier: MIT + +#include + +#include +#include +#include +#include +#include +#include + +#include + +/* + * struct fb_ops + */ + +static int drm_fbdev_shmem_fb_open(struct fb_info *info, int user) +{ + struct drm_fb_helper *fb_helper = info->par; + + /* No need to take a ref for fbcon because it unbinds on unregister */ + if (user && !try_module_get(fb_helper->dev->driver->fops->owner)) + return -ENODEV; + + return 0; +} + +static int drm_fbdev_shmem_fb_release(struct fb_info *info, int user) +{ + struct drm_fb_helper *fb_helper = info->par; + + if (user) + module_put(fb_helper->dev->driver->fops->owner); + + return 0; +} + +FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(drm_fbdev_shmem, + drm_fb_helper_damage_range, + drm_fb_helper_damage_area); + +static int drm_fbdev_shmem_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_framebuffer *fb = fb_helper->fb; + struct drm_gem_object *obj = drm_gem_fb_get_obj(fb, 0); + struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); + + if (shmem->map_wc) + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); + + return fb_deferred_io_mmap(info, vma); +} + +static void drm_fbdev_shmem_fb_destroy(struct fb_info *info) +{ + struct drm_fb_helper *fb_helper = info->par; + + if (!fb_helper->dev) + return; + + drm_fb_helper_fini(fb_helper); + + drm_client_buffer_vunmap(fb_helper->buffer); + drm_client_framebuffer_delete(fb_helper->buffer); + drm_client_release(&fb_helper->client); + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); +} + +static const struct fb_ops drm_fbdev_shmem_fb_ops = { + .owner = THIS_MODULE, + .fb_open = drm_fbdev_shmem_fb_open, + .fb_release = drm_fbdev_shmem_fb_release, + __FB_DEFAULT_DEFERRED_OPS_RDWR(drm_fbdev_shmem), + DRM_FB_HELPER_DEFAULT_OPS, + __FB_DEFAULT_DEFERRED_OPS_DRAW(drm_fbdev_shmem), + .fb_mmap = drm_fbdev_shmem_fb_mmap, + .fb_destroy = drm_fbdev_shmem_fb_destroy, +}; + +static struct page *drm_fbdev_shmem_get_page(struct fb_info *info, unsigned long offset) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_framebuffer *fb = fb_helper->fb; + struct drm_gem_object *obj = drm_gem_fb_get_obj(fb, 0); + struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); + unsigned int i = offset >> PAGE_SHIFT; + struct page *page; + + if (fb_WARN_ON_ONCE(info, offset > obj->size)) + return NULL; + + page = shmem->pages[i]; // protected by active vmap + if (page) + get_page(page); + fb_WARN_ON_ONCE(info, !page); + + return page; +} + +/* + * struct drm_fb_helper + */ + +static int drm_fbdev_shmem_helper_fb_probe(struct drm_fb_helper *fb_helper, + struct drm_fb_helper_surface_size *sizes) +{ + struct drm_client_dev *client = &fb_helper->client; + struct drm_device *dev = fb_helper->dev; + struct drm_client_buffer *buffer; + struct drm_gem_shmem_object *shmem; + struct drm_framebuffer *fb; + struct fb_info *info; + u32 format; + struct iosys_map map; + int ret; + + drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n", + sizes->surface_width, sizes->surface_height, + sizes->surface_bpp); + + format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth); + buffer = drm_client_framebuffer_create(client, sizes->surface_width, + sizes->surface_height, format); + if (IS_ERR(buffer)) + return PTR_ERR(buffer); + shmem = to_drm_gem_shmem_obj(buffer->gem); + + fb = buffer->fb; + + ret = drm_client_buffer_vmap(buffer, &map); + if (ret) { + goto err_drm_client_buffer_delete; + } else if (drm_WARN_ON(dev, map.is_iomem)) { + ret = -ENODEV; /* I/O memory not supported; use generic emulation */ + goto err_drm_client_buffer_delete; + } + + fb_helper->buffer = buffer; + fb_helper->fb = fb; + + info = drm_fb_helper_alloc_info(fb_helper); + if (IS_ERR(info)) { + ret = PTR_ERR(info); + goto err_drm_client_buffer_vunmap; + } + + drm_fb_helper_fill_info(info, fb_helper, sizes); + + info->fbops = &drm_fbdev_shmem_fb_ops; + + /* screen */ + info->flags |= FBINFO_VIRTFB; /* system memory */ + if (!shmem->map_wc) + info->flags |= FBINFO_READS_FAST; /* signal caching */ + info->screen_size = sizes->surface_height * fb->pitches[0]; + info->screen_buffer = map.vaddr; + info->fix.smem_len = info->screen_size; + + /* deferred I/O */ + fb_helper->fbdefio.delay = HZ / 20; + fb_helper->fbdefio.get_page = drm_fbdev_shmem_get_page; + fb_helper->fbdefio.deferred_io = drm_fb_helper_deferred_io; + + info->fbdefio = &fb_helper->fbdefio; + ret = fb_deferred_io_init(info); + if (ret) + goto err_drm_fb_helper_release_info; + + return 0; + +err_drm_fb_helper_release_info: + drm_fb_helper_release_info(fb_helper); +err_drm_client_buffer_vunmap: + fb_helper->fb = NULL; + fb_helper->buffer = NULL; + drm_client_buffer_vunmap(buffer); +err_drm_client_buffer_delete: + drm_client_framebuffer_delete(buffer); + return ret; +} + +static int drm_fbdev_shmem_helper_fb_dirty(struct drm_fb_helper *helper, + struct drm_clip_rect *clip) +{ + struct drm_device *dev = helper->dev; + int ret; + + /* Call damage handlers only if necessary */ + if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2)) + return 0; + + if (helper->fb->funcs->dirty) { + ret = helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, clip, 1); + if (drm_WARN_ONCE(dev, ret, "Dirty helper failed: ret=%d\n", ret)) + return ret; + } + + return 0; +} + +static const struct drm_fb_helper_funcs drm_fbdev_shmem_helper_funcs = { + .fb_probe = drm_fbdev_shmem_helper_fb_probe, + .fb_dirty = drm_fbdev_shmem_helper_fb_dirty, +}; + +/* + * struct drm_client_funcs + */ + +static void drm_fbdev_shmem_client_unregister(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + + if (fb_helper->info) { + drm_fb_helper_unregister_info(fb_helper); + } else { + drm_client_release(&fb_helper->client); + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); + } +} + +static int drm_fbdev_shmem_client_restore(struct drm_client_dev *client) +{ + drm_fb_helper_lastclose(client->dev); + + return 0; +} + +static int drm_fbdev_shmem_client_hotplug(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + struct drm_device *dev = client->dev; + int ret; + + if (dev->fb_helper) + return drm_fb_helper_hotplug_event(dev->fb_helper); + + ret = drm_fb_helper_init(dev, fb_helper); + if (ret) + goto err_drm_err; + + if (!drm_drv_uses_atomic_modeset(dev)) + drm_helper_disable_unused_functions(dev); + + ret = drm_fb_helper_initial_config(fb_helper); + if (ret) + goto err_drm_fb_helper_fini; + + return 0; + +err_drm_fb_helper_fini: + drm_fb_helper_fini(fb_helper); +err_drm_err: + drm_err(dev, "fbdev-shmem: Failed to setup emulation (ret=%d)\n", ret); + return ret; +} + +static const struct drm_client_funcs drm_fbdev_shmem_client_funcs = { + .owner = THIS_MODULE, + .unregister = drm_fbdev_shmem_client_unregister, + .restore = drm_fbdev_shmem_client_restore, + .hotplug = drm_fbdev_shmem_client_hotplug, +}; + +/** + * drm_fbdev_shmem_setup() - Setup fbdev emulation for GEM SHMEM helpers + * @dev: DRM device + * @preferred_bpp: Preferred bits per pixel for the device. + * 32 is used if this is zero. + * + * This function sets up fbdev emulation for GEM DMA drivers that support + * dumb buffers with a virtual address and that can be mmap'ed. + * drm_fbdev_shmem_setup() shall be called after the DRM driver registered + * the new DRM device with drm_dev_register(). + * + * Restore, hotplug events and teardown are all taken care of. Drivers that do + * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves. + * Simple drivers might use drm_mode_config_helper_suspend(). + * + * This function is safe to call even when there are no connectors present. + * Setup will be retried on the next hotplug event. + * + * The fbdev is destroyed by drm_dev_unregister(). + */ +void drm_fbdev_shmem_setup(struct drm_device *dev, unsigned int preferred_bpp) +{ + struct drm_fb_helper *fb_helper; + int ret; + + drm_WARN(dev, !dev->registered, "Device has not been registered.\n"); + drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n"); + + fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL); + if (!fb_helper) + return; + drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_shmem_helper_funcs); + + ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_shmem_client_funcs); + if (ret) { + drm_err(dev, "Failed to register client: %d\n", ret); + goto err_drm_client_init; + } + + drm_client_register(&fb_helper->client); + + return; + +err_drm_client_init: + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); +} +EXPORT_SYMBOL(drm_fbdev_shmem_setup); diff --git a/include/drm/drm_fbdev_shmem.h b/include/drm/drm_fbdev_shmem.h new file mode 100644 index 0000000000000..fb43cadd1950c --- /dev/null +++ b/include/drm/drm_fbdev_shmem.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef DRM_FBDEV_SHMEM_H +#define DRM_FBDEV_SHMEM_H + +struct drm_device; + +#ifdef CONFIG_DRM_FBDEV_EMULATION +void drm_fbdev_shmem_setup(struct drm_device *dev, unsigned int preferred_bpp); +#else +static inline void drm_fbdev_shmem_setup(struct drm_device *dev, unsigned int preferred_bpp) +{ } +#endif + +#endif From patchwork Tue Mar 12 15:45:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590160 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 8F8B27A70A for ; Tue, 12 Mar 2024 15:48:41 +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=1710258523; cv=none; b=gCakDmgeTht75W0B+hthNoN5jHvlaF0PfAKEhlyWtW7ajFKrQ2OproRa488T2Q/5iHd7AKrXXlpA0XNeWuNHB/9WudbK78da0Tk83abhIeEk0YToaOFyZdgqLyiMw9z2jF1ofZ8suNhlFF7OccTkRLxDa7pGSD1r+U8eDRh2TMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258523; c=relaxed/simple; bh=hTlkwTsG6AHklhq/BkqumttVJrEd5OF8f1VzrQ4RNzs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YlnI99NOBSlpCtCPcVZIwc/7leJr7sm0ihvrmAmHR9PXfeFTjqZ2bRAf2h4enO26GdKVmAxB/69NEvLBBOdB74i/HxiHYhuX2VyYoc5VrZUcU8klT2Kvn7aDCMHbo+6IiPSjghNjgFy9Bh15kcJBKrA7hd6Q5oKLvgCex6CCsaQ= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=x8yWxvCP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WfbxwxrU; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=x8yWxvCP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WfbxwxrU; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="x8yWxvCP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WfbxwxrU"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="x8yWxvCP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WfbxwxrU" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 AA0E35D6CD; Tue, 12 Mar 2024 15:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D3jobBYVSb7aHLcyPcp4C70Q5yD6wk7vtIK+a1bf1GE=; b=x8yWxvCPc4fPODFFHiOnL57Yfp/Zev8noyolJDwM53W7dkVjwiGVEdMnodJOst4WGqqN8H W0nx2tjPq4RcoQnJ9blyDgemSELTYbIbfZuRyG0GmuJFPyHEhZ93Wf/DJWmFfxEqgW5Bpp JhJhSk3phmrsEYWqMY6ogExkdGrr2u4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D3jobBYVSb7aHLcyPcp4C70Q5yD6wk7vtIK+a1bf1GE=; b=WfbxwxrU3ghgHtWrPsdkJQgHJmaJGcPrul9aEplkeyHfrdcauFbsCy8aBzTwMk7xLzRbBW Xtqoflrzb+myM/Dw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D3jobBYVSb7aHLcyPcp4C70Q5yD6wk7vtIK+a1bf1GE=; b=x8yWxvCPc4fPODFFHiOnL57Yfp/Zev8noyolJDwM53W7dkVjwiGVEdMnodJOst4WGqqN8H W0nx2tjPq4RcoQnJ9blyDgemSELTYbIbfZuRyG0GmuJFPyHEhZ93Wf/DJWmFfxEqgW5Bpp JhJhSk3phmrsEYWqMY6ogExkdGrr2u4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258519; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D3jobBYVSb7aHLcyPcp4C70Q5yD6wk7vtIK+a1bf1GE=; b=WfbxwxrU3ghgHtWrPsdkJQgHJmaJGcPrul9aEplkeyHfrdcauFbsCy8aBzTwMk7xLzRbBW Xtqoflrzb+myM/Dw== 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 641FF13976; Tue, 12 Mar 2024 15:48:39 +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 0Fe8Fld58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:39 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Dave Airlie , Jocelyn Falempe Subject: [PATCH 09/43] drm/ast: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:04 +0100 Message-ID: <20240312154834.26178-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.87 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.03)[56.96%] X-Spam-Score: 0.87 X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Jocelyn Falempe Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 90bcb1eb9cd94..4fcab4304e176 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -359,7 +359,7 @@ static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) return ret; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_shmem_setup(drm, 32); return 0; } From patchwork Tue Mar 12 15:45:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590161 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 ECF2B7D06A for ; Tue, 12 Mar 2024 15:48:42 +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=1710258524; cv=none; b=eSxkrh+qFgmaBi090zY10JaEQhPSaXL5MRCR3BGT9F/5xhS1JMZS+1N0cJcSwWu592W9GK+48R+4mbsetSwLv7o1CKFfGFsDyoufHavOqvCdw2HS442AxtnTO+3H64GlJGf2FVfACrTYw75RCoJcZKaBJabYE0N+Kr4MV+J88ws= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; c=relaxed/simple; bh=Djoa+7k8xFJVtkeoOIfS845fxdwvtJCPmZF1A8Cgxv0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KfXts893FsSwePsxqQLW5nRFjQBES/rO7diNDYZ9omaCPiOQB90xGSDrDdvTn0NEGUEy1ETDLeHCKUeibpVHvIs15uUceLJ0faACSACuUDBufDsR45ZWYru/bhkGWx7Am/hbYvrIwheSt4ayCjApoH5BGj3wuBnL3zbIzI/fGqs= 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 F0BB45D6CE; Tue, 12 Mar 2024 15:48:39 +0000 (UTC) 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 B26151364F; Tue, 12 Mar 2024 15:48:39 +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 ILEsKld58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:39 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , =?utf-8?q?Noralf_Tr=C3=B8nnes?= Subject: [PATCH 10/43] drm/gud: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:05 +0100 Message-ID: <20240312154834.26178-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: F0BB45D6CE X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes --- drivers/gpu/drm/gud/gud_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c index 9d7bf8ee45f13..4f5aa2e5cb890 100644 --- a/drivers/gpu/drm/gud/gud_drv.c +++ b/drivers/gpu/drm/gud/gud_drv.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -622,7 +622,7 @@ static int gud_probe(struct usb_interface *intf, const struct usb_device_id *id) drm_kms_helper_poll_init(drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_shmem_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590162 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 E5ABB7CF04 for ; Tue, 12 Mar 2024 15:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; cv=none; b=p3T0tWNXKI/Zxf9xavyvmslX2XHwGuGn7Ex6lkLXrXupgnOjYeogFz9FfBAgXm7LoTJVHKLs8mLrsE5jZ+ksM4wxtCfx1K9+qPBnWgGhP4Ps1jtXi0k6vByQi8GCrOdoWhFZXTRZ1oop5+O+1ARyv5DFpEgyjUaO0IK9RzyIiYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; c=relaxed/simple; bh=VcMkmFXqnVqPd25gl3a0CAAKd6Hy9Bwy3YHFctEtOIQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X63dU1k+BifNPYdXD8YdA4ApwwPvxe0iKNKgmSJIpL42PsKAO93AvmAmzXIT7MR/wiwwKHUg5D9y7IoPLjGkRzl87qgz/fmVED+KfqCzwzy5nwDTOe5bhvyAKGk4hwXx+Syh0LEVZkK4VZiVCBiIMR2S7UDbyctHTXq1csnoQeQ= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=YL3wCg5b; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IiOeHyTm; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=YL3wCg5b; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IiOeHyTm; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="YL3wCg5b"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IiOeHyTm"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="YL3wCg5b"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IiOeHyTm" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 437723787A; Tue, 12 Mar 2024 15:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258520; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OGsnbHzQTxnFyzkJxQEpu2EHVFpt2lm73V/1q6sAXVc=; b=YL3wCg5bYwg9hL3WaScXDa1BI7B7UMDhdp6WuAavYxilXMOUAy+4pTy9CbwhaMO5r7Gv0A WJQiv32mLZq49ViKBwa9NhTcLXqFeBsc6nfM5VLsNwJBDLNKQnT4/7mUoL/uS8tFNzwD46 L+RxAtr3WoZSAEiL3p6hCtxzANo5wFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258520; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OGsnbHzQTxnFyzkJxQEpu2EHVFpt2lm73V/1q6sAXVc=; b=IiOeHyTm80XPS5YRDg+cRtLFtrJ9dV0ZuXizJwOkRYJj55BDaiPHs41QWsCog98sw5MJOa x/8xvCjaCp3RYsCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258520; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OGsnbHzQTxnFyzkJxQEpu2EHVFpt2lm73V/1q6sAXVc=; b=YL3wCg5bYwg9hL3WaScXDa1BI7B7UMDhdp6WuAavYxilXMOUAy+4pTy9CbwhaMO5r7Gv0A WJQiv32mLZq49ViKBwa9NhTcLXqFeBsc6nfM5VLsNwJBDLNKQnT4/7mUoL/uS8tFNzwD46 L+RxAtr3WoZSAEiL3p6hCtxzANo5wFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258520; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OGsnbHzQTxnFyzkJxQEpu2EHVFpt2lm73V/1q6sAXVc=; b=IiOeHyTm80XPS5YRDg+cRtLFtrJ9dV0ZuXizJwOkRYJj55BDaiPHs41QWsCog98sw5MJOa x/8xvCjaCp3RYsCQ== 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 04A8C1364F; Tue, 12 Mar 2024 15:48:39 +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 EMtNO1d58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:39 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Deepak Rawat Subject: [PATCH 11/43] drm/hyperv: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:06 +0100 Message-ID: <20240312154834.26178-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: * X-Spam-Score: 1.20 X-Spamd-Result: default: False [1.20 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_HAM(-0.00)[30.32%]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.freedesktop.org,suse.de,gmail.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Deepak Rawat Reviewed-by: Deepak Rawat --- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c index cff85086f2d66..ff93e08d5036d 100644 --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -149,7 +149,7 @@ static int hyperv_vmbus_probe(struct hv_device *hdev, goto err_free_mmio; } - drm_fbdev_generic_setup(dev, 0); + drm_fbdev_shmem_setup(dev, 0); return 0; From patchwork Tue Mar 12 15:45:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590170 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 ECEE77D069 for ; Tue, 12 Mar 2024 15:48:42 +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=1710258526; cv=none; b=fazgb/lWnhiHaEwMutRG6lN4tlnJqqCCVOvJH1EucJ+6h1vi1jeXGGPjte7sHIirGkobsYW0m5VdXp4Ak6u1v9CxOB0EZas08fpvAgTtgzbCg9JnVOGmgGaTS9HLLM1IGJ3wVSVRmuoRy2MhxQtv09UJ9F5tzJLGrIJWW9+cRWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258526; c=relaxed/simple; bh=/ZHVbUIDYfzvCeqjd/BBLyM9uNQhbfDtbNl1IcpryJc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b/0JFd8V6wHs/0nR4nwL1i5qJp46lEpccEdpGzTV5mFtjxMtorJ7LKPafXdgr0aV4BK9+RELRcLoQSk02C+LxUht/e1Zx9gIrjK4uk85YER7wDSNDs7QYI6+vhsKEE+ZB8g6FhiSCtecWkS007PHi9zZ1DQLgQMDE1A8ZobQ5YU= 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 922DA5D6CB; Tue, 12 Mar 2024 15:48:40 +0000 (UTC) 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 4B4D813976; Tue, 12 Mar 2024 15:48:40 +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 kPX/EFh58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:40 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Dave Airlie , Jocelyn Falempe Subject: [PATCH 12/43] drm/mgag200: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:07 +0100 Message-ID: <20240312154834.26178-13-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 922DA5D6CB X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Jocelyn Falempe Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c index 573dbe256aa8b..65f2ed18b31c5 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -285,7 +285,7 @@ mgag200_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) * FIXME: A 24-bit color depth does not work with 24 bpp on * G200ER. Force 32 bpp. */ - drm_fbdev_generic_setup(dev, 32); + drm_fbdev_shmem_setup(dev, 32); return 0; } From patchwork Tue Mar 12 15:45:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590171 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 0D2597D06B for ; Tue, 12 Mar 2024 15:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258526; cv=none; b=mOUz2L5fNx0vFRXAT7CYk8+oGHCPB+zXyAMLSoKmmizSygCrvZN6GVVVwyT0xO1WANcn5TMEsHMfuDI8E4ylFDZBevyuvsVNYFDkD2SaFZyQBNg+b/x/62hfEAJJVzLZi80PtBE40RO6h9nt2zhUPx2QLqivkjp+vjmwS5dzKk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258526; c=relaxed/simple; bh=TE7JadnjkqWKC/JXWWNcyGkwgDdPayijUHiMuoN2kMY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oyQ5C5vk8kVmM4SIOs7vAPOIlFtb/AVSUfHl3vNtNPTqHzUM8PjS7dBxQpvea5XE1/U5K54S1mohG/i0HofX7otHbQmvtUcyHGpHAo4tp6ZylMDZbefLC2iblXBxyVpyndPyrSprX03tOieUSfkaQrZaZXYoS1w03dJofg1y0sw= 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.130 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-out1.suse.de (Postfix) with ESMTPS id D40B33787C; Tue, 12 Mar 2024 15:48:40 +0000 (UTC) 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 9A9541364F; Tue, 12 Mar 2024 15:48:40 +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 YKZXJFh58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:40 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 13/43] drm/solomon: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:08 +0100 Message-ID: <20240312154834.26178-14-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: D40B33787C X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Javier Martinez Canillas --- drivers/gpu/drm/solomon/ssd130x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index ebd943b9e357b..6f51bcf774e27 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -2029,7 +2029,7 @@ struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap *regmap) if (ret) return ERR_PTR(dev_err_probe(dev, ret, "DRM device register failed\n")); - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_shmem_setup(drm, 32); return ssd130x; } From patchwork Tue Mar 12 15:45:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590164 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 3BB577D06D for ; Tue, 12 Mar 2024 15:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; cv=none; b=KkqYZ9pr7IMMWmqD8pmqMQ3+3A7zlQCNB2QgzObcA9//FDmcdUrVgiv9bx+Drv6r58Jas2YclCPpLqN9U1yig5OYv+hqJTL8WWUs4VNcS75w/Z7Gpm+ljFtG8OiEJaInTCUT7uO6QdJhylHIj3E7kqXnZCv1UlwTX08bcpK5Nog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; c=relaxed/simple; bh=vhS/1pcV+esuIdHAcIrGhkY5l3Uq/y8OKi0L1nFKBnc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XcxM22u4LYANoylcAXQlAi+9J0vzaDA+2ssqx+6Cw1WSfCAIfmFZ9K92x+gsjU2Tb45BkALBo2e9eu383QvFiQxF49Z3URSVWCvYaEV+CYgJ0LG0KNz0WW8r+lwy5rIjd6KlfKJ15dTS0E1jrFCCnzUdQf0U/m4uGg+08Yi0q2A= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ad5xihgr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=SMJLej9l; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ad5xihgr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=SMJLej9l; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ad5xihgr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="SMJLej9l"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ad5xihgr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="SMJLej9l" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 233E13787D; Tue, 12 Mar 2024 15:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258521; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DCFoZy+f3KLRfLlVyD5LLwS0Q9/kswDk6/pysa4U4Fs=; b=ad5xihgrd3zRjSN00rUiNcG5q/OB7InbE2MFEMy7LM+iYPfbmEpnVP/pcRcGcqRTuHG1S5 yM4Le6dWs0TAt3D3ZQNZJ2I7ooqBMFjmedUOilI/k9zTfX8QmZfXRV1dl3jwGolRXekM94 R0aJwVlPnuyTi65RDmipo21LGP9RF+Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258521; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DCFoZy+f3KLRfLlVyD5LLwS0Q9/kswDk6/pysa4U4Fs=; b=SMJLej9lZNQR4nWqse+7LBUXrvgMdzuHi8oy/u4sY0MdIDJBK3iV6Ngm7PStxKyND9HxJU i+u4wmSP+3atrLCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258521; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DCFoZy+f3KLRfLlVyD5LLwS0Q9/kswDk6/pysa4U4Fs=; b=ad5xihgrd3zRjSN00rUiNcG5q/OB7InbE2MFEMy7LM+iYPfbmEpnVP/pcRcGcqRTuHG1S5 yM4Le6dWs0TAt3D3ZQNZJ2I7ooqBMFjmedUOilI/k9zTfX8QmZfXRV1dl3jwGolRXekM94 R0aJwVlPnuyTi65RDmipo21LGP9RF+Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258521; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DCFoZy+f3KLRfLlVyD5LLwS0Q9/kswDk6/pysa4U4Fs=; b=SMJLej9lZNQR4nWqse+7LBUXrvgMdzuHi8oy/u4sY0MdIDJBK3iV6Ngm7PStxKyND9HxJU i+u4wmSP+3atrLCw== 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 DB98D1364F; Tue, 12 Mar 2024 15:48:40 +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 YM0vNFh58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:40 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 14/43] drm/tiny/cirrus: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:09 +0100 Message-ID: <20240312154834.26178-15-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.85 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; URIBL_BLOCKED(0.00)[suse.de:email]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.05)[59.53%] X-Spam-Score: 0.85 X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/cirrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c index 4e3a152f897ac..3ac4f310aa2ad 100644 --- a/drivers/gpu/drm/tiny/cirrus.c +++ b/drivers/gpu/drm/tiny/cirrus.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -716,7 +716,7 @@ static int cirrus_pci_probe(struct pci_dev *pdev, if (ret) return ret; - drm_fbdev_generic_setup(dev, 16); + drm_fbdev_shmem_setup(dev, 16); return 0; } From patchwork Tue Mar 12 15:45:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590165 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 B1AC37A70A for ; Tue, 12 Mar 2024 15:48:43 +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=1710258525; cv=none; b=Wd+GBUVYeoQwy+ck2g39ljszOqehF37nUzLgFBfCo1HdGl6QV2XdpUlhXgceAxgqANCgj5/zVwv7R+Z7EQ/ovIXUsdzXNB8kAXjtn9ZfAHD0blwAYvLrh5SzitCvaY6rjvTBVAE5geCOBu6fR06CsxWqPS+6QWK/5sIibSjtcv0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; c=relaxed/simple; bh=O85/eeNJ/LiV5eW37HGKG1mNtxXWNVMFjB7vOZ0MJRU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gQxdzMwhrhjrTigdnA36m8nBTBY+omgLlp/oICwQ9v9F4DZHoQvEdGO1yv8s0E5Pt8UzbE/7/oamA5bOtydpAUncALT+p0nlNTRf1DBRBTcaFoVtSWm7Ty3zPO2/4h5Q/jbKEjqiGSXZOLlKfQff1O9H5URG4qgfjqsMDXAmFKg= 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 6A7535D6D1; Tue, 12 Mar 2024 15:48:41 +0000 (UTC) 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 2AC2813976; Tue, 12 Mar 2024 15:48:41 +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 oOP6CFl58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:41 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Hans de Goede Subject: [PATCH 15/43] drm/tiny/gm12u320: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:10 +0100 Message-ID: <20240312154834.26178-16-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 6A7535D6D1 X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Hans de Goede --- drivers/gpu/drm/tiny/gm12u320.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index 0187539ff5eaa..8b4efd39d7c41 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -699,7 +699,7 @@ static int gm12u320_usb_probe(struct usb_interface *interface, if (ret) goto err_put_device; - drm_fbdev_generic_setup(dev, 0); + drm_fbdev_shmem_setup(dev, 0); return 0; From patchwork Tue Mar 12 15:45:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590163 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 76DB47D071 for ; Tue, 12 Mar 2024 15:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; cv=none; b=JxWyJ2Pu5yGj91T27OywhLihA8T+HdeT2OstDmccWmEXQ+m/UoIXt3jtxny3JAyz7h8Hs9su0nFHCk6wmOvj7Baa1IlNmbuta0aQUtl63HnfJnI17J2g1A/92pVBBzOlwXHPv1aDzWwoi19Rw2nCXrvzcDBcoh04lgeWmGooeK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258524; c=relaxed/simple; bh=IFhD+5LGE4alpHniELdYqbd4kMMEbHZyf2k0sw6vTEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OAGZplkxlBxCL30MCwyY8E673GVKYWNlbTTK64f0gAwvp0zPXACuT+JRpQRZkTb2SyXkOogA+TJT8J2GN0+GFb47/pxIiS/LuW9htCoLgaFWEyvQcVEThhmoyvBKaIm4YZ5Khv7e0QdZ8cm6IEV28gPSynA+jo51tkmpGSeU30Y= 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.130 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-out1.suse.de (Postfix) with ESMTPS id AB5B13787E; Tue, 12 Mar 2024 15:48:41 +0000 (UTC) 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 728B51364F; Tue, 12 Mar 2024 15:48:41 +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 OAaTGll58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:41 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 16/43] drm/tiny/ofdrm: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:11 +0100 Message-ID: <20240312154834.26178-17-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: AB5B13787E X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Zimmermann Cc: Javier Martinez Canillas --- drivers/gpu/drm/tiny/ofdrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c index ab89b7fc7bf61..35996f7eedac0 100644 --- a/drivers/gpu/drm/tiny/ofdrm.c +++ b/drivers/gpu/drm/tiny/ofdrm.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -1377,7 +1377,7 @@ static int ofdrm_probe(struct platform_device *pdev) if (color_mode == 16) color_mode = odev->format->depth; // can be 15 or 16 - drm_fbdev_generic_setup(dev, color_mode); + drm_fbdev_shmem_setup(dev, color_mode); return 0; } From patchwork Tue Mar 12 15:45:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590166 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 C05167D073 for ; Tue, 12 Mar 2024 15:48:43 +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=1710258525; cv=none; b=jh2sa8NqCi013GFy6a5HCpqSA+/8l5jXoZ++c8gRfr3UDkiRgYi1ELFZJfhdCNPA5MuK9ee3EgBPqGY9ayjMfmNlKzlpPJEtILLQMfu9/dLDI4DUFb2POUyD4HAa/I9L0eh7ycfnFAWMdL3fks2DK2dr8hovsDzjeXYOqgkQtGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; c=relaxed/simple; bh=N52aWKpglV8IBk938alokF4d/WbC9Zry5gD+EBVcZHE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZQxQN7vzmUS9kNPjaPuLWJ5xHEHxKSX1nUNcoU9rLsDQm1eDW6P9V0kGAGig2Eyxs3itvgkrAQcUJuYe5yLngrjYe9o7j6PBDzMtF6H1z1K4tZu57z1IX3BIKEv7FBFn8dldbyr198cJRkmUmgk8iTDyiHMqWv0uxmsdZK62AeE= 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 EEF075D6D4; Tue, 12 Mar 2024 15:48:41 +0000 (UTC) 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 B41A91364F; Tue, 12 Mar 2024 15:48:41 +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 0O6TKll58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:41 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 17/43] drm/tiny/simpledrm: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:12 +0100 Message-ID: <20240312154834.26178-18-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: EEF075D6D4 X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Zimmermann Cc: Javier Martinez Canillas --- drivers/gpu/drm/tiny/simpledrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c index 7ce1c46176750..3cb09ad5f7537 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -1026,7 +1026,7 @@ static int simpledrm_probe(struct platform_device *pdev) if (color_mode == 16) color_mode = sdev->format->depth; // can be 15 or 16 - drm_fbdev_generic_setup(dev, color_mode); + drm_fbdev_shmem_setup(dev, color_mode); return 0; } From patchwork Tue Mar 12 15:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590169 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 3B9F57CF1C for ; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; cv=none; b=g4faexfAGWL49s8LS1+4y3hDGpDR/MIGLypNUWid6jimgyZqRQZjMnHz2aStlPB3lS5Ja1xkQNq5oeqtdS4dJQioLkfkV3A5Wbl1O5aXywJB5KDzZmtGMX1tLVMxiObBfi/28hJpjZPm+h5CHjuJHsRqpDJJi41LMmv5Wku30LI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; c=relaxed/simple; bh=VwaUaMJOGwg2yCnEQYjkY1zMoLslW5h6Aae1KAKMKgU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WyrqplSqlS8ZLPcUBmEm6oePubgKzxOjypQyZiTpYoa/68u7J3WKpNPZ9EVI3o699LfnQX6o47h8k/8SEvI9JrdEBCErUDPaOq8sn2Mf+zDzPhbotstz/h5tMAe6K3q4i8uA7PdU5dHQSpgLiFdpk3s/deI49U/LO6kQXbiXaBM= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Xmtt0hA7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AXRWuDoR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Xmtt0hA7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AXRWuDoR; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Xmtt0hA7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AXRWuDoR"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Xmtt0hA7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AXRWuDoR" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 48DF33787F; Tue, 12 Mar 2024 15:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258522; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7E+AmYYgvd1TshN4fyzja+mLJyBpAEdrCcSeB1p8hJI=; b=Xmtt0hA7yc7g78FrTyiYTEZ9lYlJO+GvV88sLh55LBhrFUuz08j5tVSFvLCncytLAEH21N Q9JY/+IHMyb3MDWkJyIWhZbp6iR/Yd8ybDfor/vkSkYUBUC9sWBLylmsCRiCKZU+KZ6/WS qMWrkmpZRR71O7szPDsrGmXJ5B7jkzM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258522; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7E+AmYYgvd1TshN4fyzja+mLJyBpAEdrCcSeB1p8hJI=; b=AXRWuDoRotskieMnEMudrF5WVHOMZi8XxHDkaCGWRp5mDFT205YmDoshmwtElfWkT51utl ATgFN8SAfxMcwNBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258522; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7E+AmYYgvd1TshN4fyzja+mLJyBpAEdrCcSeB1p8hJI=; b=Xmtt0hA7yc7g78FrTyiYTEZ9lYlJO+GvV88sLh55LBhrFUuz08j5tVSFvLCncytLAEH21N Q9JY/+IHMyb3MDWkJyIWhZbp6iR/Yd8ybDfor/vkSkYUBUC9sWBLylmsCRiCKZU+KZ6/WS qMWrkmpZRR71O7szPDsrGmXJ5B7jkzM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258522; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7E+AmYYgvd1TshN4fyzja+mLJyBpAEdrCcSeB1p8hJI=; b=AXRWuDoRotskieMnEMudrF5WVHOMZi8XxHDkaCGWRp5mDFT205YmDoshmwtElfWkT51utl ATgFN8SAfxMcwNBw== 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 036B31364F; Tue, 12 Mar 2024 15:48:41 +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 KC6rOll58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:41 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Dave Airlie , Sean Paul Subject: [PATCH 18/43] drm/udl: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:13 +0100 Message-ID: <20240312154834.26178-19-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.57 X-Spamd-Result: default: False [-0.57 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.27)[74.10%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Sean Paul Cc: Thomas Zimmermann --- drivers/gpu/drm/udl/udl_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 1506094a80098..9612e9af27a47 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -117,7 +117,7 @@ static int udl_usb_probe(struct usb_interface *interface, DRM_INFO("Initialized udl on minor %d\n", udl->drm.primary->index); - drm_fbdev_generic_setup(&udl->drm, 0); + drm_fbdev_shmem_setup(&udl->drm, 0); return 0; } From patchwork Tue Mar 12 15:45:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590167 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 1908779DCA for ; Tue, 12 Mar 2024 15:48:44 +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=1710258525; cv=none; b=jmJ3SyHQGruFzN15f2SrjqxkhhVaXxbslk4ag9AJCYD+MXlE/LhmjuYxMoMuzM9T052d7B/lUIQI2akGEFRDSMZcFnyKwPi6svQsKDiggvvfUOa+EoYt3QmzS7r+ipplRGUn6ou9K9uxSsEABPHQ4ofh5sXQDHNMaDQUGyXLzSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258525; c=relaxed/simple; bh=ooP4tJTrUqeijc2wokWAx2wimKCr95Z5+hyjr9KccCk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jIKsiTmULfwn8ydf3RCwGLvQJvYhUDYc47UIcGTyS6cUxLCdN+DiblLFkpwmBvnkJ2d8wMcZEgc5FFk5fryT0cSxoy3BEf8NET2RGO9wQZgJoJnSGF6P6m01afhcC41uFdrWtKw6TcJ3C7rCNjl8vSlo89S1G2A+f8zk36ofQyQ= 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 A5F1F5D6CF; Tue, 12 Mar 2024 15:48:42 +0000 (UTC) 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 5096313976; Tue, 12 Mar 2024 15:48:42 +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 8JUwElp58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:42 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu Subject: [PATCH 19/43] drm/virtio: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:14 +0100 Message-ID: <20240312154834.26178-20-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: A5F1F5D6CF X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Airlie Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu Tested-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 9539aa28937fa..3d626bbaab9e4 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include "virtgpu_drv.h" @@ -103,7 +103,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev) if (ret) goto err_deinit; - drm_fbdev_generic_setup(vdev->priv, 32); + drm_fbdev_shmem_setup(vdev->priv, 32); return 0; err_deinit: From patchwork Tue Mar 12 15:45:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590176 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 AE6A37D082 for ; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; cv=none; b=D0XvHjG2LQ9D/5Sal3cq9reN08/bw+NQTGtfIx7Sx1Tedj5386dPErlbhv/w6bBg/efCC9Hxt1Im7ASjHVzo228SeElaLZfuyCCN2XULDt5yOxzctY6LIAYYgGsjsjBK+hj3goT/2ANakycXczLeE/Mh9TyGCzeHD6ISeYU0wBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; c=relaxed/simple; bh=grfiF49c8/ZgjpztMMDXnj3IXzIjXvVfon19oYLeQYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b0o6vGRxXH7T4UtazMxTbs29ntYErJ68pQrzaEvGz89Q2lZZCrErYRCy35uQaTPcrtz5/jvAMk1j6Fnq/OP1T4MKxivqRwpT8VnJy7AzOulGNZOfbqoBnjVE1tr5n77PUHVBeMVkRioIKnbnGLFPJoBLU5/PW2BPvpEYcQ8uO0E= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=d7BkL/Cu; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ErLfoTp1; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=d7BkL/Cu; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ErLfoTp1; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="d7BkL/Cu"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ErLfoTp1"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="d7BkL/Cu"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ErLfoTp1" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 091C537880; Tue, 12 Mar 2024 15:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jM6OJtpI0VSHF+e3kYIJB8BPtK7t3FGNyyJBVLYyDnM=; b=d7BkL/CuLg4b6bUOGcpn+LobSC8JqfK7BsE3p5U+GqTsp/I9tZeVIu4fBrBLzCXEFUEn9v avK2wFTBgrWOC3B03gqkCNO/GXL+U7Sz+s6Pk+PVqlB+QkBdkEXVXnFqNwM4N/Tdb6BepD UhTb8BJeVp5vAdsdu7SLrMmjpLgaAJ8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jM6OJtpI0VSHF+e3kYIJB8BPtK7t3FGNyyJBVLYyDnM=; b=ErLfoTp1n7l8qT1YbvSOjCvYl08TYj8sXEDmVxgnVJC2nCIqSt2I7FNjarJwNcZpfV13qh cU8VGOrDQeD+tPDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jM6OJtpI0VSHF+e3kYIJB8BPtK7t3FGNyyJBVLYyDnM=; b=d7BkL/CuLg4b6bUOGcpn+LobSC8JqfK7BsE3p5U+GqTsp/I9tZeVIu4fBrBLzCXEFUEn9v avK2wFTBgrWOC3B03gqkCNO/GXL+U7Sz+s6Pk+PVqlB+QkBdkEXVXnFqNwM4N/Tdb6BepD UhTb8BJeVp5vAdsdu7SLrMmjpLgaAJ8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jM6OJtpI0VSHF+e3kYIJB8BPtK7t3FGNyyJBVLYyDnM=; b=ErLfoTp1n7l8qT1YbvSOjCvYl08TYj8sXEDmVxgnVJC2nCIqSt2I7FNjarJwNcZpfV13qh cU8VGOrDQeD+tPDA== 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 AC8CA1364F; Tue, 12 Mar 2024 15:48:42 +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 mPGnKFp58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:42 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Rodrigo Siqueira , Melissa Wen , =?utf-8?q?Ma=C3=ADra_Canal?= , Haneen Mohammed Subject: [PATCH 20/43] drm/vkms: Use fbdev-shmem Date: Tue, 12 Mar 2024 16:45:15 +0100 Message-ID: <20240312154834.26178-21-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.18 X-Spamd-Result: default: False [-4.18 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_HAM(-1.38)[90.76%]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[11]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.freedesktop.org,suse.de,gmail.com,riseup.net]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Flag: NO Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: "Maíra Canal" Cc: Haneen Mohammed Cc: Daniel Vetter --- drivers/gpu/drm/vkms/vkms_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index dd0af086e7fa9..8dc9dc13896e9 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -223,7 +223,7 @@ static int vkms_create(struct vkms_config *config) if (ret) goto out_devres; - drm_fbdev_generic_setup(&vkms_device->drm, 0); + drm_fbdev_shmem_setup(&vkms_device->drm, 0); return 0; From patchwork Tue Mar 12 15:45:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590172 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 EC9567D091 for ; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258526; cv=none; b=UcGQsHQWjkPCPAEKEDKVZQlyNWQvhewAyZ/Zq74y7VUrNL8gO+LGhTbvcUvz1KQPSFP4dM+1j0ZtCiIpgMCNtGWmkgDT2A1hl099mxLfESYuk3T+oUzdbVfzMcNDJO8lIke8tTiCLWAmebd4GghGYr4uWRzlVpW/R17PDdQYHLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258526; c=relaxed/simple; bh=GQOh04HguvFGGpNiU6rSwkOAHA1iKrAtAFfcUnX02LE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pdic+k6SgXEQJMhBFNShip58pU0DVcbGpiyPT7OEylEE7O7kVAzmdWBuJ4dy14FMErpP7QyguZ1sSxs6ltAo/7cAk67UoQjkt9lYCRpDgohBj6i4hGiVwy5YsPIrK/PP7gFE9BzUuZs1bS5DIn4Og3FvdjAbZ3z/S1vYh+OohMA= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zigQjuBE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=XpOXo1YC; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zigQjuBE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=XpOXo1YC; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zigQjuBE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XpOXo1YC"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zigQjuBE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XpOXo1YC" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 4A0BF37882; Tue, 12 Mar 2024 15:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8GGbMRr2pNsUL5b5tCCveZ2b5thQIo+QY2/HdRe3xec=; b=zigQjuBExTO4ig0wNhETuIqrrK84z7gswBA1FdiK48G3J2ryUVzysAyi4KqS9Cf4Pry/bh gqXw0l6kabRxYZUkdOa4ynhanx9tIDaXFUzP+Fi6Jch2ZW5KoDh6ogEDQColJa/mw68/Mi XOuPxYrtWTXMlgDBggeuKPSLJ/hnrgA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8GGbMRr2pNsUL5b5tCCveZ2b5thQIo+QY2/HdRe3xec=; b=XpOXo1YCMAsBhD6JJ3AFqxhWBBlWlwC9xN99pYhAg8PDYOXNAXaAK9dF0FT+twjN+P4JPn RY0/FlFfof5rKJCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8GGbMRr2pNsUL5b5tCCveZ2b5thQIo+QY2/HdRe3xec=; b=zigQjuBExTO4ig0wNhETuIqrrK84z7gswBA1FdiK48G3J2ryUVzysAyi4KqS9Cf4Pry/bh gqXw0l6kabRxYZUkdOa4ynhanx9tIDaXFUzP+Fi6Jch2ZW5KoDh6ogEDQColJa/mw68/Mi XOuPxYrtWTXMlgDBggeuKPSLJ/hnrgA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8GGbMRr2pNsUL5b5tCCveZ2b5thQIo+QY2/HdRe3xec=; b=XpOXo1YCMAsBhD6JJ3AFqxhWBBlWlwC9xN99pYhAg8PDYOXNAXaAK9dF0FT+twjN+P4JPn RY0/FlFfof5rKJCQ== 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 1034C13976; Tue, 12 Mar 2024 15:48:43 +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 AJ+VAlt58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:43 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 21/43] drm/fbdev-dma: Implement damage handling and deferred I/O Date: Tue, 12 Mar 2024 16:45:16 +0100 Message-ID: <20240312154834.26178-22-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[28.89%] X-Spam-Score: 0.90 X-Spam-Flag: NO Add support for damage handling and deferred I/O to fbdev-dma. This enables fbdev-dma to support all DMA-memory-based DRM drivers, even such with a dirty callback in their framebuffers. The patch adds the code for deferred I/O and also sets a dedicated helper for struct fb_ops.fb_mmap that support coherent mappings. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fbdev_dma.c | 65 ++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c index 6c9427bb4053b..8ffd072368bca 100644 --- a/drivers/gpu/drm/drm_fbdev_dma.c +++ b/drivers/gpu/drm/drm_fbdev_dma.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -35,6 +36,22 @@ static int drm_fbdev_dma_fb_release(struct fb_info *info, int user) return 0; } +FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(drm_fbdev_dma, + drm_fb_helper_damage_range, + drm_fb_helper_damage_area); + +static int drm_fbdev_dma_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_framebuffer *fb = fb_helper->fb; + struct drm_gem_dma_object *dma = drm_fb_dma_get_gem_obj(fb, 0); + + if (!dma->map_noncoherent) + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); + + return fb_deferred_io_mmap(info, vma); +} + static void drm_fbdev_dma_fb_destroy(struct fb_info *info) { struct drm_fb_helper *fb_helper = info->par; @@ -51,20 +68,13 @@ static void drm_fbdev_dma_fb_destroy(struct fb_info *info) kfree(fb_helper); } -static int drm_fbdev_dma_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) -{ - struct drm_fb_helper *fb_helper = info->par; - - return drm_gem_prime_mmap(fb_helper->buffer->gem, vma); -} - static const struct fb_ops drm_fbdev_dma_fb_ops = { .owner = THIS_MODULE, .fb_open = drm_fbdev_dma_fb_open, .fb_release = drm_fbdev_dma_fb_release, - __FB_DEFAULT_DMAMEM_OPS_RDWR, + __FB_DEFAULT_DEFERRED_OPS_RDWR(drm_fbdev_dma), DRM_FB_HELPER_DEFAULT_OPS, - __FB_DEFAULT_DMAMEM_OPS_DRAW, + __FB_DEFAULT_DEFERRED_OPS_DRAW(drm_fbdev_dma), .fb_mmap = drm_fbdev_dma_fb_mmap, .fb_destroy = drm_fbdev_dma_fb_destroy, }; @@ -98,10 +108,6 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, dma_obj = to_drm_gem_dma_obj(buffer->gem); fb = buffer->fb; - if (drm_WARN_ON(dev, fb->funcs->dirty)) { - ret = -ENODEV; /* damage handling not supported; use generic emulation */ - goto err_drm_client_buffer_delete; - } ret = drm_client_buffer_vmap(buffer, &map); if (ret) { @@ -112,7 +118,7 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, } fb_helper->buffer = buffer; - fb_helper->fb = buffer->fb; + fb_helper->fb = fb; info = drm_fb_helper_alloc_info(fb_helper); if (IS_ERR(info)) { @@ -133,8 +139,19 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer)); info->fix.smem_len = info->screen_size; + /* deferred I/O */ + fb_helper->fbdefio.delay = HZ / 20; + fb_helper->fbdefio.deferred_io = drm_fb_helper_deferred_io; + + info->fbdefio = &fb_helper->fbdefio; + ret = fb_deferred_io_init(info); + if (ret) + goto err_drm_fb_helper_release_info; + return 0; +err_drm_fb_helper_release_info: + drm_fb_helper_release_info(fb_helper); err_drm_client_buffer_vunmap: fb_helper->fb = NULL; fb_helper->buffer = NULL; @@ -144,8 +161,28 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, return ret; } +static int drm_fbdev_dma_helper_fb_dirty(struct drm_fb_helper *helper, + struct drm_clip_rect *clip) +{ + struct drm_device *dev = helper->dev; + int ret; + + /* Call damage handlers only if necessary */ + if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2)) + return 0; + + if (helper->fb->funcs->dirty) { + ret = helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, clip, 1); + if (drm_WARN_ONCE(dev, ret, "Dirty helper failed: ret=%d\n", ret)) + return ret; + } + + return 0; +} + static const struct drm_fb_helper_funcs drm_fbdev_dma_helper_funcs = { .fb_probe = drm_fbdev_dma_helper_fb_probe, + .fb_dirty = drm_fbdev_dma_helper_fb_dirty, }; /* From patchwork Tue Mar 12 15:45:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590173 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 5780C7B3EF for ; Tue, 12 Mar 2024 15:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258527; cv=none; b=rlCg+/8YIptNxTudL3cn8zEyrnA+UwKW0lZH/iUEoysscrbtwoT+ac2wxS04KyScEhZcWoqiQurZmiBvbopPHRk90J9OLZ7a3PmXznUqkHqf81oYDywVKQDiMrqjfgyYsMBRlpysux+5y63/BgHq5uj1OZFmBr3TUdh3HgTB+og= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258527; c=relaxed/simple; bh=78/8Iu+OGDZe9cQjA5eNlwZDD5H3DAE3otMpSNQeBSM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sOiGtd7yUMP2pQlXDP2wUEd0yDX1siUfuDUOrLb6PhARiiTiPNt24CcRhoRJW49kh0elR4dpEF3jAAf9wuo1d6GX/x05STlrBU8G44QI/MgrXfiArLGSZP/X8X83OU2f5B2GpMtXtdoE8j+6zbswn7RsGN4MYtwoaz6FbcaAC3Q= 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.130 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-out1.suse.de (Postfix) with ESMTPS id 8D12737884; Tue, 12 Mar 2024 15:48:43 +0000 (UTC) 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 4F5261364F; Tue, 12 Mar 2024 15:48:43 +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 ACQLElt58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:43 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Liviu Dudau Subject: [PATCH 22/43] drm/arm/komeda: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:17 +0100 Message-ID: <20240312154834.26178-23-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 8D12737884 X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by komeda. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Liviu Dudau Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index cc57ea4e13ae6..ffdeec3b3f2ea 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include "komeda_dev.h" @@ -80,7 +80,7 @@ static int komeda_platform_probe(struct platform_device *pdev) } dev_set_drvdata(dev, mdrv); - drm_fbdev_generic_setup(&mdrv->kms->base, 32); + drm_fbdev_dma_setup(&mdrv->kms->base, 32); return 0; From patchwork Tue Mar 12 15:45:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590180 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 17CF07CF01 for ; Tue, 12 Mar 2024 15:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; cv=none; b=PIHIbkEES8xoARBEDGq9e6mfFvwHQYW327K6Ww2DPmL1150RNz0CRwHY99JoGHX7j8r6wGQ10pppgJqajyG1FwQwL2UpiMOJ8i8Wr5Cj60jgZDMsKadVtAHZ3o8QxxWVURPpZVqMRyDQuVyCG6QFzl2Cw2FawZZTt5nmKQDq86U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; c=relaxed/simple; bh=qknXN2a7HbL++O5jltndBgBz2PrMaQ+jguvlSSp8Eqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q4G8MgO3/E5/yQa0jbZQmh5s+gKau9jUsCO1c5L1GydhL8nXYihwlF4eNI7wr0pjRriuTYPj/gRMWP1JWThVmaxr8KCtI1YdB7pRitG7sTIjIIiXoRuQpyLJ8vQ0D+1Qj5CJ6+GJvRDmmNmyApLH+0Jfl3nAs5JR0E9tfJJbllU= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TsYtGtib; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=gPR6IGbz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TsYtGtib; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=gPR6IGbz; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TsYtGtib"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="gPR6IGbz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TsYtGtib"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="gPR6IGbz" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 05CE637883; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvU/oX92qmfPDwVvIlJovnY/NpQB3UnTKpLQEh5cNBc=; b=TsYtGtibkPxrargGYqzqjSVUEePjRXjXFBxpViOuH3BhCvVGUfZsM4Osd6i4rJmgEmEXVv qjVV6PjJ1/lisuYuv+zhGhixkJypObQE1HaAeQPUfQ6xSme62h/0Hq3FbmdjthpPGPdI3a BuotndaSicsnzqX9FIYkLFTG5AeEDjQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvU/oX92qmfPDwVvIlJovnY/NpQB3UnTKpLQEh5cNBc=; b=gPR6IGbzHPDIRCypyZa9kU2YZ6P6PlnaOZtBdx6JsRTUsBrPnR1KPOhQZVdYizmR+qmhIC jSLGAg2LIT+smJBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvU/oX92qmfPDwVvIlJovnY/NpQB3UnTKpLQEh5cNBc=; b=TsYtGtibkPxrargGYqzqjSVUEePjRXjXFBxpViOuH3BhCvVGUfZsM4Osd6i4rJmgEmEXVv qjVV6PjJ1/lisuYuv+zhGhixkJypObQE1HaAeQPUfQ6xSme62h/0Hq3FbmdjthpPGPdI3a BuotndaSicsnzqX9FIYkLFTG5AeEDjQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvU/oX92qmfPDwVvIlJovnY/NpQB3UnTKpLQEh5cNBc=; b=gPR6IGbzHPDIRCypyZa9kU2YZ6P6PlnaOZtBdx6JsRTUsBrPnR1KPOhQZVdYizmR+qmhIC jSLGAg2LIT+smJBw== 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 9428E1364F; Tue, 12 Mar 2024 15:48:43 +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 qJXMIlt58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:43 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Xinliang Liu , Tian Tao , Xinwei Kong , Sumit Semwal , Yongqin Liu , John Stultz Subject: [PATCH 23/43] drm/hisilicon/kirin: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:18 +0100 Message-ID: <20240312154834.26178-24-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[13]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[24.13%] X-Spam-Score: 0.90 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by kirin. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 75292a2f46445..12666985686b9 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -237,7 +237,7 @@ static int kirin_drm_bind(struct device *dev) if (ret) goto err_kms_cleanup; - drm_fbdev_generic_setup(drm_dev, 32); + drm_fbdev_dma_setup(drm_dev, 32); return 0; From patchwork Tue Mar 12 15:45:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590175 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 6A6587CF0C for ; Tue, 12 Mar 2024 15:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; cv=none; b=J7kAl3Twaq0Ydil4Rxav+N9mmdsQPxpdKuQusXRQuJ+3VJZloKzW6ixPtjxFx6kfe2ScywzNjvcgMrU9UT6SP+snF9gDCv5Oad3S1JHfQMiigDVyehB2Q6KLzzmR0xY5OevIBbLPygzrdDhuf+vsdd4lhP3ALiWBIc8LyUwlXvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; c=relaxed/simple; bh=j7DhLNJErnXHb8xa/mA8KZ7Lo4L9KVUlvEytdVYSvzQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JXg6g+pBJXivAYehcxk6kNn27UMEetsQdHY//5xIWJxFBY+WqFixUTcUvgABhjvsv18ijU9NucjLvelPPOEDeFPYtchn7Q2mPAGuuSsivKqu7nT7z+Qp7JZAghs0PJ22wlAXfhxz6ruVmX3t0NSP0C4cwF4uPAaczdCEAnMUlZs= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=dTU01CNk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6BIO59HQ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=dTU01CNk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6BIO59HQ; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dTU01CNk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6BIO59HQ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dTU01CNk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6BIO59HQ" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 57F7137885; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GfufjkwGXb5Pn8U6FMPt4Da/+UPWAw7LVvCmTgBaxu4=; b=dTU01CNk/zRfFBtDLHTwmN0FhzBLgARBPkUwZjMCmlLbWWc+EEnQLhm7s0eo0fj0rqoXLk nd+NpqiLTgEmbVYc33zGO+DmDxaHabh8mzf3LsAugRGcXX6wBS5WIhl779CuxP0g3cX6+J fhCVJoZxZ2vuAmdgOW1mFzTr7Xvwmrk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GfufjkwGXb5Pn8U6FMPt4Da/+UPWAw7LVvCmTgBaxu4=; b=6BIO59HQzPZ2UBre/tDfnBDx6YYuJdf2MkUkMdOouwIDnl58ntKa4AuI3TlTT2Tts20faW dwl5u1x5kw7gAQDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GfufjkwGXb5Pn8U6FMPt4Da/+UPWAw7LVvCmTgBaxu4=; b=dTU01CNk/zRfFBtDLHTwmN0FhzBLgARBPkUwZjMCmlLbWWc+EEnQLhm7s0eo0fj0rqoXLk nd+NpqiLTgEmbVYc33zGO+DmDxaHabh8mzf3LsAugRGcXX6wBS5WIhl779CuxP0g3cX6+J fhCVJoZxZ2vuAmdgOW1mFzTr7Xvwmrk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GfufjkwGXb5Pn8U6FMPt4Da/+UPWAw7LVvCmTgBaxu4=; b=6BIO59HQzPZ2UBre/tDfnBDx6YYuJdf2MkUkMdOouwIDnl58ntKa4AuI3TlTT2Tts20faW dwl5u1x5kw7gAQDA== 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 01EB413976; Tue, 12 Mar 2024 15:48:43 +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 oFu1Olt58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:43 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH 24/43] drm/imx/lcdc: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:19 +0100 Message-ID: <20240312154834.26178-25-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.82 X-Spamd-Result: default: False [-0.82 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWELVE(0.00)[12]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.freedesktop.org,suse.de,kernel.org,pengutronix.de,gmail.com,nxp.com]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.52)[80.26%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by lcdc. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team --- drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c index 43ddf3a9810b6..36668455aee8c 100644 --- a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c +++ b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -501,7 +501,7 @@ static int imx_lcdc_probe(struct platform_device *pdev) if (ret) return dev_err_probe(dev, ret, "Cannot register device\n"); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590179 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 98AD87D3FF for ; Tue, 12 Mar 2024 15:48:46 +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=1710258529; cv=none; b=f3LabU0JS7dwv4xqhieUYV0QxHviaaGRKNacpRYw1RSHxsadgNuT7IWOg5ldMw1FiLI2voIgQehUAXOyDad95J791Npj0APagV4Oa9WJKwCSyKIySmQiAWunwfRRKsAQ006dZE+WnYgz/t2ThW5cuVWSvKwz8+por8lobepf57Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; c=relaxed/simple; bh=bS0SDVlJ8KrEnZ5aE3lx2PonwpkBw0TLY2m+oHAmrjY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BtbKsTgsrEFws+6Qd6yJZ5zlTAKsJUPkLVP5r+4n8N0cyw81FLQv0tUY8Nfvw4uHn8YClUn8es8auok7W8Bu0QYyCgSsDZAA3KAPqJl40/NSXfEKFIHobpmr/ZDBHoDbWDU7LyFPJTe4/By0Vpz64vepzPLd7j7HGA1TS6cZksU= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=SvT+OA2Y; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RYrJKX+B; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=SvT+OA2Y; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RYrJKX+B; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="SvT+OA2Y"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RYrJKX+B"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="SvT+OA2Y"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RYrJKX+B" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 9FC6D5D6CC; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OXFdnlzdGByMsY9pFY4Mifj9IG/C+80tZQ/+RvnyxIQ=; b=SvT+OA2YXGzj7VDfc3xYhA91jCM1ikkj50IGTWz+aLsoiyP02BcUMeFDg5Y8PK+4qnZhRk hZp0u2uCcOJc2CauIWf57joHLf8l9DUX3VeJCQjbyCeksmT30kXWth6eU3MM0A7Itzw9EL vG2Pfj6tJI7NqioaT2lWQT0SOJOZG+g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OXFdnlzdGByMsY9pFY4Mifj9IG/C+80tZQ/+RvnyxIQ=; b=RYrJKX+BJkE/nOx1AX2hgXoeC01UnQEJvxN9HZGtP436j9cAnyvx4MBnePX5SAEIfToy48 4/tPHKiUCHomiZDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OXFdnlzdGByMsY9pFY4Mifj9IG/C+80tZQ/+RvnyxIQ=; b=SvT+OA2YXGzj7VDfc3xYhA91jCM1ikkj50IGTWz+aLsoiyP02BcUMeFDg5Y8PK+4qnZhRk hZp0u2uCcOJc2CauIWf57joHLf8l9DUX3VeJCQjbyCeksmT30kXWth6eU3MM0A7Itzw9EL vG2Pfj6tJI7NqioaT2lWQT0SOJOZG+g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OXFdnlzdGByMsY9pFY4Mifj9IG/C+80tZQ/+RvnyxIQ=; b=RYrJKX+BJkE/nOx1AX2hgXoeC01UnQEJvxN9HZGtP436j9cAnyvx4MBnePX5SAEIfToy48 4/tPHKiUCHomiZDA== 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 5F6661364F; Tue, 12 Mar 2024 15:48:44 +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 mLf5FVx58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:44 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Paul Cercueil Subject: [PATCH 25/43] drm/ingenic: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:20 +0100 Message-ID: <20240312154834.26178-26-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; URIBL_BLOCKED(0.00)[suse.de:email,crapouillou.net:email]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[33.51%] X-Spam-Score: 0.90 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ingenic. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 0751235007a7e..39fa291f43dd1 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -1399,7 +1399,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components) goto err_clk_notifier_unregister; } - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Tue Mar 12 15:45:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590174 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 98A877D3FC for ; Tue, 12 Mar 2024 15:48:46 +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=1710258528; cv=none; b=WGLejkMu/qsqUUTxUhcvF2MugLkTeRYijx/xyCr6P9q7HFjQeswcqOMI4UL4Bh1kIFdfweBXQMjyN+XljlDnCupGLWygBHpmVFthKbjtQ1wevU0yaKPkZVZxBouiSD4EAuxEpRoWJUE71hxBmLWK69HA85/t1j6eYDlmJV0kDok= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; c=relaxed/simple; bh=h9zm4BLHHAuvachfR6pCx84o2CmmCrBVNqtsopeb4dU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QJ2uVEh0e3mFo3QVxCjrP7H0P/ZCtAJgB3iLMqtfKLzf3L59b/n+iDf01rhb47jIGTY7qveQnjjZMfKSOyv6p1FhCVJ/PQHDpkLeRkDnxLmRkC/AUPzR3I+cBOd/dP/jx9US/erJXoc8cNSU4oEZgEHrWD6d7TwivZj02b5Yjoo= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=B8+8DoaR; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=d2EJc1Jr; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=qlsZSEWE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=LkKx5j0D; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="B8+8DoaR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="d2EJc1Jr"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qlsZSEWE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="LkKx5j0D" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 EACA05D6D0; Tue, 12 Mar 2024 15:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258525; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xIzRHd3hIqAAOXViEx8KqPgwO6FLdV4gz16vEDsZHvY=; b=B8+8DoaRMMCwWZAxp6EidrcWnGLzcMdVtr6zLFGudHsKUvkhCTjwWdogad/pngDC4dSqm0 AEgwR4UeOgNri87m51l0zYuVzzmyg8QKSvDHIOQRt1REB11aBfNeChI67QsUXnSxHjouDm NJKNNMYynbpVdF6oyuGNmpIpqRElM7E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258525; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xIzRHd3hIqAAOXViEx8KqPgwO6FLdV4gz16vEDsZHvY=; b=d2EJc1Jr9/h4ZXButCe8pVOsRsMTU9DFM+6fUq6SfIh+/jicN3gmebFi06OQHNK/cOpDbq VBjWjzeXvD1cHWAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xIzRHd3hIqAAOXViEx8KqPgwO6FLdV4gz16vEDsZHvY=; b=qlsZSEWEVc32MJJ2kH/pjeq506z1B7dxY/Q3JYAsS6dgY7mWxbamQC9b3Y0qrGJDyE3sJt iM4Y0OyqINu/xfH0g0ReCJuQKecjg++IofdXWBJ2tIg8l/rs+smQc79lDjy8BrCvLu10d7 LwQU9yG3eRr5ZzLohwPPjaGSWM7n2OM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258524; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xIzRHd3hIqAAOXViEx8KqPgwO6FLdV4gz16vEDsZHvY=; b=LkKx5j0DHizskmBxuJgWSJTDpfQCYDbNFnTQfuOPagTf/N143f80BbTCIHst1I8l7COfK4 v6rEdSC6+JIx2uCw== 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 A790813976; Tue, 12 Mar 2024 15:48:44 +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 gM2KJ1x58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:44 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Chun-Kuang Hu , Philipp Zabel Subject: [PATCH 26/43] drm/mediatek: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:21 +0100 Message-ID: <20240312154834.26178-27-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[18.21%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ingenic. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Chun-Kuang Hu Cc: Philipp Zabel --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 74832c2130921..5dcedf0fc4467 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -644,7 +644,7 @@ static int mtk_drm_bind(struct device *dev) if (ret < 0) goto err_deinit; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Tue Mar 12 15:45:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590177 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 08F8D7D073 for ; Tue, 12 Mar 2024 15:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; cv=none; b=BCvVSs0gleQtnetMskG+JL/XJLDxR4MiJ+2bIUv6nY8RMozKCY/4SrxDtk0CWNYr7KvdC/HD3w8qWLqNeaqAL5Zhwr0t/By3qFE5wLtlqKEvjJX89FiwglafCCxlLsu0DPmPCuJfU1PeNZ9O/quYDO3McyRejhEij0ZNJjliLSA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258528; c=relaxed/simple; bh=6ZvoQx9bpgdjEXadweCDJNHa39R4vkXLTUEiUHN6WcA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ILC2pvTGA34kUgJUqHXFmIs3x7qKl5BXJG736WJxxNNQAb+HRgEaJcc5Y5/9naY61ujXUNQfBAApriHgcOu1tDLJ81XzOVcS+pE1VBpi/mn0KF/k7V9ijGe1yuJh/YmjmPgMHESNhTr76wy7m3OaUrnWOFew/ChK7Y9r+yz1ml0= 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.130 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-out1.suse.de (Postfix) with ESMTPS id 4B7C337886; Tue, 12 Mar 2024 15:48:45 +0000 (UTC) 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 F20581364F; Tue, 12 Mar 2024 15:48:44 +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 6Em8OVx58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:44 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Neil Armstrong , Jessica Zhang , Sam Ravnborg Subject: [PATCH 27/43] drm/panel/panel-ilitek-9341: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:22 +0100 Message-ID: <20240312154834.26178-28-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 4B7C337886 X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by panel-ilitek-9341. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Neil Armstrong Cc: Jessica Zhang Cc: Sam Ravnborg --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c index 3574681891e81..89830582b5d79 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include @@ -650,7 +650,7 @@ static int ili9341_dbi_probe(struct spi_device *spi, struct gpio_desc *dc, spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590178 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 0E5F87D3F8 for ; Tue, 12 Mar 2024 15:48:47 +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=1710258529; cv=none; b=czusmS/V/cYZczCqR8Hc+TuBnjIasXkUt71H8Kofo4xgICq3ay3I49pV2kkNC2nGhOCVLHoZsxzjyMLqSC2N0qgslNqILMsfCRwRI9H4yPUNV3D3PM1OY6bXu1E6/Gbx56fyrXoinFSajPwe0/50qlqMdbeDOknAriKj5CTbtBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; c=relaxed/simple; bh=Flu46HyLqa9jSJlFuH/x24joklcUsfbc8EUq4vY5sR8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PKJv5xK9mAtZvrlCtObXhtTHLzkLxmPG2YxQXVzd4f2DW8EHnCV2U4npxFoVdir/F7ZfOMYJtBblFJiaRkx222Fks+jpNoWDTL16Bsz2+L6YXPiRImdqaGeJaYvTiBywj2ei12FyfH1XgDKWO4hMO4T30v4YjIAydGDMb4wjzGc= 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 9A0A55D6D3; Tue, 12 Mar 2024 15:48:45 +0000 (UTC) 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 521D51364F; Tue, 12 Mar 2024 15:48:45 +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 4AmpEl158GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:45 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Laurent Pinchart , Kieran Bingham Subject: [PATCH 28/43] drm/renesas/rcar-du: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:23 +0100 Message-ID: <20240312154834.26178-29-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; TAGGED_RCPT(0.00)[renesas]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 9A0A55D6D3 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by rcar-du. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Kieran Bingham --- drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c index dee530e4c8b27..fb719d9aff10d 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -716,7 +716,7 @@ static int rcar_du_probe(struct platform_device *pdev) drm_info(&rcdu->ddev, "Device %s probed\n", dev_name(&pdev->dev)); - drm_fbdev_generic_setup(&rcdu->ddev, 32); + drm_fbdev_dma_setup(&rcdu->ddev, 32); return 0; From patchwork Tue Mar 12 15:45:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590182 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 D04FE7D091 for ; Tue, 12 Mar 2024 15:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; cv=none; b=fz3xtPogqBNuqFYFdymFy8ly34pbo4sZZOE23WCbykqQDcynecPbR7bqWPb4xs468vnLEOuLI1dvj9HMc1E3etCv7wc1MR2pkJ+UB8SCauThDdAJBgtIc0QrmUoIRZ27NTjW3LcZEbtPiRYp2yCiYSX320xkb10RlI+t88L8ChY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; c=relaxed/simple; bh=KSpsXhc8HSWTLy7TNnt4pXysKYK9OKbTPTcpeXtBPIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ILHxNykGJy7NSk8LXcFM1cf30W66fPGP892ZZ7u+oQ8w4UEPMLwweMxdZaW+r/5hGoT0qwTcwvodG45hZPg3cCxcMZ8JnTE1F3I68x1KQHJzEuD3yNJRdoEQlig4h6fyGu2jB4XuQCrVdLuz9FjVRLj/46Q2qHQAJA+F80+FY40= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c/7iEvPb; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HmWyrctT; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cAXYjWBO; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Wjea6xvi; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c/7iEvPb"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HmWyrctT"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cAXYjWBO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Wjea6xvi" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id DF04D37887; Tue, 12 Mar 2024 15:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258526; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wLfiDuaxyQvQd+ibaXVSxSmnXJxwlxsmUuNH51aID50=; b=c/7iEvPbxkAOVopEg/3Em+xU5r97m6Fj3/z2fVBjHT21lTCjumcE+V/sFrvWBZbAfojaB6 2JQvYZlxji8Kfw8fa5iKcLk/s2FqUrgd5zlg2edNLp6RPfRrk5jAn1X4WiTqfqfnESSsbM SZsOgpZSaBVXrCAP5gO+WH5yos7VEaY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258526; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wLfiDuaxyQvQd+ibaXVSxSmnXJxwlxsmUuNH51aID50=; b=HmWyrctT2p6XTKwI4NJedUIiKiUkI9ZTLat3ttB7VanZ+sF4RfBc1NR9VSLOIRWsGlJ+Ku maZdH/y+4hAf7FAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258525; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wLfiDuaxyQvQd+ibaXVSxSmnXJxwlxsmUuNH51aID50=; b=cAXYjWBOdY1N4iDx4jF9K8mAlYVABwPksqjhT6aiHOeXRfruOJauvBprl7Q4FMrOaxYv7a HGkwjQLfrEvo9aeIvOXzF+2uznBObKXWgCUuWXLTdzWxhONi4dcMV54cPM2R1UeTUw5RZ6 qhrCBrsNBpXnzLXTHQD+ORjSxJQfhp4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258525; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wLfiDuaxyQvQd+ibaXVSxSmnXJxwlxsmUuNH51aID50=; b=Wjea6xvit7qFL40ng7yOPk3JJadILIfe6DC1W06NFE8HFwckL9jUcqzuUyYFHxoHHoIT8y kQXagh6SfL6V1uBQ== 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 A06AD1364F; Tue, 12 Mar 2024 15:48:45 +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 mNjSJV158GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:45 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Biju Das Subject: [PATCH 29/43] drm/renesas/rz-du: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:24 +0100 Message-ID: <20240312154834.26178-30-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; URIBL_BLOCKED(0.00)[suse.de:email,renesas.com:email]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[12.39%] X-Spam-Score: 0.90 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by rz-du. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Biju Das Tested-by: Biju Das --- drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c index 470d34da1d6c4..e5eca8691a331 100644 --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -149,7 +149,7 @@ static int rzg2l_du_probe(struct platform_device *pdev) drm_info(&rcdu->ddev, "Device %s probed\n", dev_name(&pdev->dev)); - drm_fbdev_generic_setup(&rcdu->ddev, 32); + drm_fbdev_dma_setup(&rcdu->ddev, 32); return 0; From patchwork Tue Mar 12 15:45:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590181 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 C97647CF1B for ; Tue, 12 Mar 2024 15:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; cv=none; b=V/fmMMdIqHRSqG4RXRyXcXugdbXq+dlQLWqEq0X39VHfRCgattaNiyc39hJXQ1qkqW8bS56RziVlnCNnoNuWrPFd3uvEFq37gryFG88MRLsSao0lPvXjfb2HszkiOE5e3zL9STMI/RQRvv/bccI9p9tAErGs/Jany2oD3hAuVNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; c=relaxed/simple; bh=qNbKEytXJ+IhbsAo5SgDNCPh+f7dQlZyyRhiHUeJILM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VaJ0Wu3980HGopGbaWYR0Uryty93t0VEsJudXAOhB+SnSNjwCnxHbEI008+tLp03NxlZIBK4KVmEe6OQVgzvpUi/tYmdb9PWLz7Zq+4H0OvuQKrWlxKak1DVKGhOCnUACYMmjwq8+GYVHNwCLMxnKWNgZqXTqb4cO6v1wwBP5GY= 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.130 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-out1.suse.de (Postfix) with ESMTPS id 3B4E937888; Tue, 12 Mar 2024 15:48:46 +0000 (UTC) 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 E6BC013976; Tue, 12 Mar 2024 15:48:45 +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 gFPrNl158GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:45 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Laurent Pinchart , Geert Uytterhoeven Subject: [PATCH 30/43] drm/renesas/shmobile: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:25 +0100 Message-ID: <20240312154834.26178-31-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; TAGGED_RCPT(0.00)[renesas]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 3B4E937888 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by shmobile. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Geert Uytterhoeven --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c index e83c3e52251de..890cc2f6408d6 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -250,7 +250,7 @@ static int shmob_drm_probe(struct platform_device *pdev) if (ret < 0) goto err_modeset_cleanup; - drm_fbdev_generic_setup(ddev, 16); + drm_fbdev_dma_setup(ddev, 16); return 0; From patchwork Tue Mar 12 15:45:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590183 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 31D8F7D406 for ; Tue, 12 Mar 2024 15:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; cv=none; b=izOYd97hQyyZdZPN7tgmoV4ab7HTyDPIo7txiOvjKu88VM9Af0Eip0B0THelVwNM+yPIVbQ/YcV493Z8G87lS0G6xoO6QhKOS+xWbHJHCHDBY/pUjdQpcewKKzFvJ8V0i1bHqf/AGW6/IrUckVis5J3Bhu3HpOrbm9eY5z4dARE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258529; c=relaxed/simple; bh=YzGLDm6SmoQAjN5TNgeEX+mOgLokGlPA8TotHLGQWzM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dcz4TM0nD/7UoXSMPhVDzgG3HfdaRhye/ErOZl5QhfktZRsrXYOreqqocirXagVzA7LMNLb2SlK+ubU2jBxYgsUtvZ/BGwJvkHX6d8w/SHZ2HFVH3k9dj1pC5NPihMVfrlhElA0y0bxHJQOi9foR4XOj7jiMJyIHftqoy+f1JuA= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=brs0es5V; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=x0LIlz+a; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=brs0es5V; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=x0LIlz+a; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="brs0es5V"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="x0LIlz+a"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="brs0es5V"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="x0LIlz+a" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 8D5BD37871; Tue, 12 Mar 2024 15:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258526; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KRxh/Lk+QPPRpDEAxnUlaJ14JzQMNPP/uOgrZJroZ0w=; b=brs0es5VNrnhl9Uaa9YgopCE3+5jyhTtkzIwj++kvqTLUyEridAkhHPpqmQf6VgIzs30rU 4sndZa7PrX1VudIiiEcopyF2nsm0xa2dK+YmATkxkbxExhb2JPmUKOcvPeIaNcG7Qd0xPr YatVK1pfEjHuagCRpL02zruiwiaUdVA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258526; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KRxh/Lk+QPPRpDEAxnUlaJ14JzQMNPP/uOgrZJroZ0w=; b=x0LIlz+aUDQMWH2kfHHU0fXqg/8FARkWhyaDKlTHgnb3RVzmIZqz0Gksx1+og4Qoe5Ld75 +fiQCtkYoAVHLAAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258526; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KRxh/Lk+QPPRpDEAxnUlaJ14JzQMNPP/uOgrZJroZ0w=; b=brs0es5VNrnhl9Uaa9YgopCE3+5jyhTtkzIwj++kvqTLUyEridAkhHPpqmQf6VgIzs30rU 4sndZa7PrX1VudIiiEcopyF2nsm0xa2dK+YmATkxkbxExhb2JPmUKOcvPeIaNcG7Qd0xPr YatVK1pfEjHuagCRpL02zruiwiaUdVA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258526; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KRxh/Lk+QPPRpDEAxnUlaJ14JzQMNPP/uOgrZJroZ0w=; b=x0LIlz+aUDQMWH2kfHHU0fXqg/8FARkWhyaDKlTHgnb3RVzmIZqz0Gksx1+og4Qoe5Ld75 +fiQCtkYoAVHLAAQ== 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 42D8C1364F; Tue, 12 Mar 2024 15:48:46 +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 aHrwDl558GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:46 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan Subject: [PATCH 31/43] drm/rockchip: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:26 +0100 Message-ID: <20240312154834.26178-32-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -6.71 X-Spamd-Result: default: False [-6.71 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[10]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.41)[97.28%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by rockchip. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index ab55d71325500..44d769d9234d6 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -191,7 +191,7 @@ static int rockchip_drm_bind(struct device *dev) if (ret) goto err_kms_helper_poll_fini; - drm_fbdev_generic_setup(drm_dev, 0); + drm_fbdev_dma_setup(drm_dev, 0); return 0; err_kms_helper_poll_fini: From patchwork Tue Mar 12 15:45:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590184 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 7ACF07D412 for ; Tue, 12 Mar 2024 15:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258530; cv=none; b=qF7hcz6mz9egWmxoRV7O7+TIos6vT1Wq4Vkq+prsf0dhFIjEj0BIBLeVfIxNhNYmNEE1jmhQC5Jzeh2o2qI+TGA/RxvFCuhKRT1Xn81GR1IYA9h0jRBh+Ox2N3vrXMbpuZnb4y7C5lCtfhRNohE/PX15aZqTpU0kofoDCGgleFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258530; c=relaxed/simple; bh=0etuq4MAfhDEE4izzf0iuIqQB2VlA/27zMfUln9HbS8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Oka+liUX4w919JBeub8/4Ri3KE4kFYGf8rEvJVS2yBWpQVVcKNktXPSmp8PaGrpTnCDhv+dj+pQxxVClmJ5sHCS0THlBT6cAwI6h1erERiViPwrrO5hB0gGXY5B4lYpG5EHa7ih2MjgRO/kZM6ewUvBIls3UcuiFhwGV1o7qroI= 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.130 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-out1.suse.de (Postfix) with ESMTPS id CDEA73787C; Tue, 12 Mar 2024 15:48:46 +0000 (UTC) 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 9400013976; Tue, 12 Mar 2024 15:48:46 +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 iI/AIl558GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:46 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 32/43] drm/tiny/hx8357d: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:27 +0100 Message-ID: <20240312154834.26178-33-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: CDEA73787C X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by hx8357d. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/hx8357d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c index cdc4486e059b5..2e631282edeb4 100644 --- a/drivers/gpu/drm/tiny/hx8357d.c +++ b/drivers/gpu/drm/tiny/hx8357d.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -256,7 +256,7 @@ static int hx8357d_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590185 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 A782D7CF31 for ; Tue, 12 Mar 2024 15:48:48 +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=1710258530; cv=none; b=s1jvMKl/mwzag45k7572qrnqMFaG/Zwl5rWJtU86ozxea9CbSv5whH+ESRmHDHGm18TVqI8epJtzhRevHDiMUwy3NuQ9Ufs4uguY+EgXPzFYYsHh+MgWBcGVfcenHptqezLAZfrMIA2709bm9FHzGbxadAQoz3h9VBMIpgAZwn4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258530; c=relaxed/simple; bh=k1vy5DtVc4cvjEz7Zm/Jbzzlv687UsaAtte755yeAow=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o7e6YWN6uJBSbaAWYCxtu8CWoQusrbERsNTvGNRT/npbWikib1SrhRh/ft/EL7rRFoCiaPfQF04iYSm1NafI4rntegUx9KjDSeMLBT2A18gPrToWAdNbplO7WOl2xPxbXa6GiqS2yQZ4yFR7rBeSxJdV2SdpY2iwriIdsvoNksM= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cGVMvZ3D; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=gAnE5gzp; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cGVMvZ3D; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=gAnE5gzp; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cGVMvZ3D"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="gAnE5gzp"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cGVMvZ3D"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="gAnE5gzp" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 204785D6D8; Tue, 12 Mar 2024 15:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7S25v5yiTOkgr0NdB0G0YkcSfVhgn+aBrT5pS0pWC6U=; b=cGVMvZ3Dx6kP/ijbjXX55JW300Jcn0J6lYlasr8lEO4GFX+hSwNsglH8NeLzuETcr1vVjk 6nEgD7EVFYWxy0L0nROQrt/+k/r8lrz24Vt4b1VOVfg1NegeG1wq96EtxIF9s+uQJCP9Kr YNKmKbXCewt6SMxXx4VYVHOr/ffwTSQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7S25v5yiTOkgr0NdB0G0YkcSfVhgn+aBrT5pS0pWC6U=; b=gAnE5gzpwCOceAkuADEcsBF/WUqp0+Jnv+hWRmbfen0X18Yo/8+c6T+B6xh2jjwJCuOj+A dgWrFuagMXo0UtBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7S25v5yiTOkgr0NdB0G0YkcSfVhgn+aBrT5pS0pWC6U=; b=cGVMvZ3Dx6kP/ijbjXX55JW300Jcn0J6lYlasr8lEO4GFX+hSwNsglH8NeLzuETcr1vVjk 6nEgD7EVFYWxy0L0nROQrt/+k/r8lrz24Vt4b1VOVfg1NegeG1wq96EtxIF9s+uQJCP9Kr YNKmKbXCewt6SMxXx4VYVHOr/ffwTSQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7S25v5yiTOkgr0NdB0G0YkcSfVhgn+aBrT5pS0pWC6U=; b=gAnE5gzpwCOceAkuADEcsBF/WUqp0+Jnv+hWRmbfen0X18Yo/8+c6T+B6xh2jjwJCuOj+A dgWrFuagMXo0UtBw== 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 D9C1F1364F; Tue, 12 Mar 2024 15:48:46 +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 MCX/Ml558GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:46 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 33/43] drm/tiny/ili9163: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:28 +0100 Message-ID: <20240312154834.26178-34-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.35 X-Spamd-Result: default: False [-0.35 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.05)[60.14%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9163. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/ili9163.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9163.c b/drivers/gpu/drm/tiny/ili9163.c index bc4384d410fcc..86f9d88349015 100644 --- a/drivers/gpu/drm/tiny/ili9163.c +++ b/drivers/gpu/drm/tiny/ili9163.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include @@ -185,7 +185,7 @@ static int ili9163_probe(struct spi_device *spi) if (ret) return ret; - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590191 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 E72A77D082 for ; Tue, 12 Mar 2024 15:48:48 +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=1710258532; cv=none; b=LRDLXDxHjQxLcOCrEIDXS0EZQkWTbptuBzXaX9ezrQBiQFXm21+YmIjmt/a1sxY7rp8J9KAfAkoxY7WTQXWS2KvpjXiaacA/N3JDs41W++HYwP9bkBpd/xwIG00d0bcR6MkMg1XGZMt1E/zHoDz+hcJNMuWx1CaRTSchAEqD71Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258532; c=relaxed/simple; bh=pu4+pr9vbuCJH8G2YVjRruUq0X6xoLZN2EgQxnRxbaw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ONUpFI71RIT72Ho3h5ZXEixnxDBnQzpjT4NgJE/Xk9yGE30bOxWb7kmd17jZzgNrDQ76cQc2OFORkaoNDPV8D/K0/GJ5R1ffyQSEVe1wM/rmhhzZxxjWiRsShrMSdDpCX2IIVn4Gpg2F0AKEgvGwfZGVJYCDuSt6kPi4q3/5pPg= 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 69FC65D6D9; Tue, 12 Mar 2024 15:48:47 +0000 (UTC) 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 2862C13976; Tue, 12 Mar 2024 15:48:47 +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 iO5nCF958GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:47 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , David Lechner Subject: [PATCH 34/43] drm/tiny/ili9225: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:29 +0100 Message-ID: <20240312154834.26178-35-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 69FC65D6D9 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9225. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner --- drivers/gpu/drm/tiny/ili9225.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9225.c b/drivers/gpu/drm/tiny/ili9225.c index dd8b0a181be94..537df5f5b8a6e 100644 --- a/drivers/gpu/drm/tiny/ili9225.c +++ b/drivers/gpu/drm/tiny/ili9225.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -426,7 +426,7 @@ static int ili9225_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590186 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 8E6117D3FF for ; Tue, 12 Mar 2024 15:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258531; cv=none; b=ebq+kOIjfAx8dEwrejbKb84m0sEZjw3OGN7DZ8KultKmPp79D1NO8edlFKJc+LArxCKquFmJLvo9VjP4XqziRJR1CPL9a7VtHwGSf+/jdJoBkyos3jwChGLe4nsju3fbUlQbvsNAqOt0jSJEIKsyahXc631NYcXxIahcFHRw+oQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258531; c=relaxed/simple; bh=x+OCqQsRTZ3F1QgGOPKUCWAJvD1cjq50EGlmHiuEDXU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZKbugtCUvAGbt7CUUBxu4FPcnUN98ZnuCmaPWT4Id6ESAMVwWQ8cwU2y8MZrGfyh9Kyh83z89oMaDCa6LEHbIA+Oun0pPdMocLj33zbDW0sg7J/Vm2AyqyOjXDq/1SUl9eRIUxNpelAe7W35xchNCorNLCxQHKtqlW7NrlR/rhs= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=A30Bu30s; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=zU/uYyf6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=A30Bu30s; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=zU/uYyf6; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="A30Bu30s"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zU/uYyf6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="A30Bu30s"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zU/uYyf6" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id AE4E43787D; Tue, 12 Mar 2024 15:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hpPdUGnw+xpvGmk4DPAD+Z6Kgn5w4FD/5bGOcgkG4YM=; b=A30Bu30s/7JtmcszTHZB0ABK8Sw9NXPxXwVX52Jc1GquGGGEjblYi9tuK1UFGN9zBYIQM+ ps8xOCsiZFFvktItQ42FuCAjwct0n2btNyY5GAMLKbUXM+Rs6/2pNUhOfxdsOr+mwGxvqC PXXtQbArypbCxcAly9JxISr7TJn5Lnk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hpPdUGnw+xpvGmk4DPAD+Z6Kgn5w4FD/5bGOcgkG4YM=; b=zU/uYyf6CHO9BYZbAh/mr1pukmh88QarYLD4NgbQHUj+UpbJIEGGKNTdEAMlGkyBB0IwOg x9h5WmZxhVDQ55Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hpPdUGnw+xpvGmk4DPAD+Z6Kgn5w4FD/5bGOcgkG4YM=; b=A30Bu30s/7JtmcszTHZB0ABK8Sw9NXPxXwVX52Jc1GquGGGEjblYi9tuK1UFGN9zBYIQM+ ps8xOCsiZFFvktItQ42FuCAjwct0n2btNyY5GAMLKbUXM+Rs6/2pNUhOfxdsOr+mwGxvqC PXXtQbArypbCxcAly9JxISr7TJn5Lnk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hpPdUGnw+xpvGmk4DPAD+Z6Kgn5w4FD/5bGOcgkG4YM=; b=zU/uYyf6CHO9BYZbAh/mr1pukmh88QarYLD4NgbQHUj+UpbJIEGGKNTdEAMlGkyBB0IwOg x9h5WmZxhVDQ55Aw== 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 70C0C1364F; Tue, 12 Mar 2024 15:48:47 +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 4AcmGl958GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:47 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Kamlesh Gurudasani Subject: [PATCH 35/43] drm/tiny/ili9341: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:30 +0100 Message-ID: <20240312154834.26178-36-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: * X-Spam-Score: 1.19 X-Spamd-Result: default: False [1.19 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.01)[46.86%]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.freedesktop.org,suse.de,gmail.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9341. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Kamlesh Gurudasani --- drivers/gpu/drm/tiny/ili9341.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9341.c b/drivers/gpu/drm/tiny/ili9341.c index 47b61c3bf1457..8bcada30af717 100644 --- a/drivers/gpu/drm/tiny/ili9341.c +++ b/drivers/gpu/drm/tiny/ili9341.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -218,7 +218,7 @@ static int ili9341_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590190 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 0FB3E7D3E1 for ; Tue, 12 Mar 2024 15:48:49 +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=1710258532; cv=none; b=GAKSW4H2KXtgn9BFIVCTLwD4SCsDC7lmY1iX8xgVSUr7VQwyt79L79FMOzjwDctCsbIYwF+EE8gI+mnBgPumdIWol3F+OYQaIefjkt4lYWeIwMEiyS5bdKMP8gTM7GyHGVmap3UYPtnpNwwTEEYrqI9KSZ/Qs90fvRl1wUTbN9I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258532; c=relaxed/simple; bh=Tt93g/dmtAQ8tixrVaXUe39cM8/ZXdD6bzvaGO0DHEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TsClLxx0wNyNAlr6tBGwwFcrmBlgzguswXMNgWmv0CBZqaxzryILNR94yhyGFBmmoVh3OW35vmKEC0H4UfafmvMzXTabpQ2PVVw0RMuvYiH3+0era2zP3dFthb7guPrTn+sOV5/iLU0GEOccfLobHWxiwnpgeM538IBy+44+Oj0= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=1lY0WVO+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=acJ0fiAk; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Wa1vxEW4; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=M+GeKsM9; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="1lY0WVO+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="acJ0fiAk"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Wa1vxEW4"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="M+GeKsM9" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 F0D635D6DA; Tue, 12 Mar 2024 15:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmLyjBIU+sa+KC6TShmVXNvGuSHoNkmIJLCbXbUAGms=; b=1lY0WVO+tA74b2+IGyvyfSrng429CUsMb77wr+nRBz9/Wwl6eR5FdPElzxVfLZUscpbahE p0Kn7uVeXKWGXbduE5yMXRZaKL1CqVG4wz3tet84D8s4LPTAxHq78GBi4+utVuZduSKbLr Nr5cdyQw8N6rUgWVjHgVd0wEbt6Ju3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmLyjBIU+sa+KC6TShmVXNvGuSHoNkmIJLCbXbUAGms=; b=acJ0fiAkVi3XiEOVr7yxFAnIlArILER01nuE8c03SXraekAT4KO1Kfx8BeLHpQsCGFoyAl LpvFOZBTovLEIFBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmLyjBIU+sa+KC6TShmVXNvGuSHoNkmIJLCbXbUAGms=; b=Wa1vxEW43ZH5xlgwEFczTuWtBdD0YmF5j4VgCzx5NLwQWWYXK762SB9yrt96PcWdSJWiiC 4Hw610TJkRyHz9LM04rMVZc0axgy4lw8DiJOYGJDKBEcS6DL3L9uIyqVANCvi1xSIb/yEg gEdHTAMeIS1ag19neIQrcrot7cA9ZFY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258527; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmLyjBIU+sa+KC6TShmVXNvGuSHoNkmIJLCbXbUAGms=; b=M+GeKsM9SN/0MH4J2A56a6ah210LttCdG4U8rbfxmL+/fuItAEDCM055tSmOuNV6dluIPm MG0NzLX5EN73DXCA== 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 B5F6E13976; Tue, 12 Mar 2024 15:48:47 +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 cI0OK1958GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:47 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 36/43] drm/tiny/ili9486: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:31 +0100 Message-ID: <20240312154834.26178-37-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.33 X-Spamd-Result: default: False [-0.33 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.03)[56.72%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9486. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/ili9486.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c index 938bceed59998..70d3662600410 100644 --- a/drivers/gpu/drm/tiny/ili9486.c +++ b/drivers/gpu/drm/tiny/ili9486.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -247,7 +247,7 @@ static int ili9486_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590187 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 0FB987E0EC for ; Tue, 12 Mar 2024 15:48:49 +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=1710258531; cv=none; b=EwmKiaKhD28FFrZHObwVTzMqEXWYpD6htnYk7i7RQtKC6MdYgOuvdWe/L+gj+U1SnKYhJVY74G4+WiMn6eKIIKyCuYDJKQFVwUdbziitguqyKOO7bolSoFsm3KZR/oCTCvKdN19k5rjBib3UTM+8iIbcveSX+7kcwbENAMQchlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258531; c=relaxed/simple; bh=bCdYX+iRzY2W/RGGKRzc8GWvCe3VZQszDyoILJuFguI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jFgAEHktuSu86X1T1GtFB5QYVTgI3Md4uUYTXGLN5AYmJBO1qgDImEB7fE0ysBjB8VMOe90T5Abk8xIwJAoQWHLSfJglQznUfWXEI2+UvdH+AVNEv7rIbSapoWzdNnM1uRt7jYNHL04pRcyhrKw2DMUlYhNR7rLJwrP1MKGBbew= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=BkHA+x4q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=G6C1cQOz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=BkHA+x4q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=G6C1cQOz; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BkHA+x4q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="G6C1cQOz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BkHA+x4q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="G6C1cQOz" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 4DEDC5D6DC; Tue, 12 Mar 2024 15:48:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9wIfRgXFHI6e23AJk9Ot5gFyI+o9MU8+1XMdOA9YrSM=; b=BkHA+x4qnPArHle+ZeJI8BpKcHRPUZlH+tzERZxXiZOj6t46ASsuFGCqdOEaauz/ffh0by HgE8uyq+6acJYmphWHaa5uKhnRmCQupFnuBATKXp89QAU+FFSkhHzNu6VekAp3+Irha9Ah uHx0dwUXXtEVJ0FNSMGCErlVDbFEr2c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9wIfRgXFHI6e23AJk9Ot5gFyI+o9MU8+1XMdOA9YrSM=; b=G6C1cQOz1Owua1GyGGOt+6O2xhPqYVAngfGe2Yiw118QLOoTfP1sQr4euFdAmQusGA4k7Y vJNdck6VgS1vHjAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9wIfRgXFHI6e23AJk9Ot5gFyI+o9MU8+1XMdOA9YrSM=; b=BkHA+x4qnPArHle+ZeJI8BpKcHRPUZlH+tzERZxXiZOj6t46ASsuFGCqdOEaauz/ffh0by HgE8uyq+6acJYmphWHaa5uKhnRmCQupFnuBATKXp89QAU+FFSkhHzNu6VekAp3+Irha9Ah uHx0dwUXXtEVJ0FNSMGCErlVDbFEr2c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9wIfRgXFHI6e23AJk9Ot5gFyI+o9MU8+1XMdOA9YrSM=; b=G6C1cQOz1Owua1GyGGOt+6O2xhPqYVAngfGe2Yiw118QLOoTfP1sQr4euFdAmQusGA4k7Y vJNdck6VgS1vHjAg== 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 03D521364F; Tue, 12 Mar 2024 15:48:47 +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 kNAYO1958GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:47 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , =?utf-8?q?Noralf_Tr=C3=B8nnes?= Subject: [PATCH 37/43] drm/tiny/mi0283qt: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:32 +0100 Message-ID: <20240312154834.26178-38-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -4.31 X-Spamd-Result: default: False [-4.31 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.01)[51.48%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by mi0283qt. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes --- drivers/gpu/drm/tiny/mi0283qt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/mi0283qt.c b/drivers/gpu/drm/tiny/mi0283qt.c index 01ff43c8ac3ff..e46581d74c257 100644 --- a/drivers/gpu/drm/tiny/mi0283qt.c +++ b/drivers/gpu/drm/tiny/mi0283qt.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -226,7 +226,7 @@ static int mi0283qt_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590193 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 21AD07A70A for ; Tue, 12 Mar 2024 15:48:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258533; cv=none; b=Hmm4/UKNvhISWXBN01a2ezduzIvyqU2McYjLoyjXUbMbBckAlv6QvfEfIXopBrliVKRJt4YN8xxRYPlFdzOmyhlzWU2GeIwP3UpU5iPuBN7fFf+fDShGJ0UGhYjJmQw9nl5ofy2+thpxIF+5m95SsTyEU/30VUplzQGpArqsmmE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258533; c=relaxed/simple; bh=oSOHcyP0Bqs9yguppWm4YlVgCkBL6MiXCBDGSQ9GkWc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tqZThFfsIsxocZQAxAFUl8/IjTSvtwSN1Ngc3QMCjDzhIMg6pNSLinI/YaA2nn427E61hPDfIxXrtw/qYA7nk7MFfioZNWtkfOXDUWH9idMmqh1jToZWsNmqMs+F3oXU2ZkDlN1gP1O6n4xyGkGcA1+tHyy4VnqgkvNANzwY9U4= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zl0++YKb; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BiqH/pPb; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zl0++YKb; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BiqH/pPb; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zl0++YKb"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BiqH/pPb"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zl0++YKb"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BiqH/pPb" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 8B8743788A; Tue, 12 Mar 2024 15:48:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dlOkLgyECt6izJv/Ij1/xYwf7WvifjAXRqFzZEWeX/s=; b=zl0++YKbhYp1y3dxMI4LkoCXEBtYQU0Dk2llghEO3sOqd0Qy/c85fZpR081Q1+VcmdvRkD 768r/LBj4Y3z71Q1gy0GYgYiXGijsWtvub316FSrIGcbWrHi+YkGL1U5aLH1oqkiC+GKR5 OQ10QJpSY1lMSDmTqXfVVDWisZ/2vx8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dlOkLgyECt6izJv/Ij1/xYwf7WvifjAXRqFzZEWeX/s=; b=BiqH/pPbx7w833fn2NclwjVqQpKNrfy4maGrxaGF6mucldsfnNbKgcAMVc3LDGSbZqOrmz Bzxelo1nl3fWU6CQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dlOkLgyECt6izJv/Ij1/xYwf7WvifjAXRqFzZEWeX/s=; b=zl0++YKbhYp1y3dxMI4LkoCXEBtYQU0Dk2llghEO3sOqd0Qy/c85fZpR081Q1+VcmdvRkD 768r/LBj4Y3z71Q1gy0GYgYiXGijsWtvub316FSrIGcbWrHi+YkGL1U5aLH1oqkiC+GKR5 OQ10QJpSY1lMSDmTqXfVVDWisZ/2vx8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dlOkLgyECt6izJv/Ij1/xYwf7WvifjAXRqFzZEWeX/s=; b=BiqH/pPbx7w833fn2NclwjVqQpKNrfy4maGrxaGF6mucldsfnNbKgcAMVc3LDGSbZqOrmz Bzxelo1nl3fWU6CQ== 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 4BCA413976; Tue, 12 Mar 2024 15:48:48 +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 EAQIEWB58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:48 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , =?utf-8?q?Noralf_Tr=C3=B8nnes?= Subject: [PATCH 38/43] drm/tiny/panel-mipi-dbi: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:33 +0100 Message-ID: <20240312154834.26178-39-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.31 X-Spamd-Result: default: False [-4.31 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.01)[47.73%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by panel-mipi-dbi. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes --- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/panel-mipi-dbi.c b/drivers/gpu/drm/tiny/panel-mipi-dbi.c index f80a141fcf365..4cc4ca787c7d1 100644 --- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c +++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -335,7 +335,7 @@ static int panel_mipi_dbi_spi_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590188 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 6C0B67E0F3 for ; Tue, 12 Mar 2024 15:48:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258531; cv=none; b=pdhh44PiWi3ubItxv6AaDpaskM+TKasPCC3i9Bvr68f0wn8yf/cQZPAaEn5oPMuicmsGoPTSB69zdoTKUtNL90blQ2hBaxt5oPl1gq0j4QiFf+B2r5jymiDbI6mSrhE5RssWucdh15OXqndqLDBxIylWntihc6XsxsuK1BOJJBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258531; c=relaxed/simple; bh=Re/hZlLR1YCr2RsqUBCA9+jRzuGjPadbXAzJ/NAvMY4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TYlxiCh/tO7zyD7+fyljIw/CEceh/z6GcBie44TWT+392Ja3jHid+BuQYUtwamVDkkzXa/Tm2M0zuVSPhPLqATc020mGEsrX4X1tPNUNrgOlFlNtfAxvELhGwHgmYWemejtLKOmkkBVzu8f0G2Zrq593JqZl23eiKI1DUiXGEsk= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KiUHcyzJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=oEgZbN68; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KiUHcyzJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=oEgZbN68; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KiUHcyzJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oEgZbN68"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KiUHcyzJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oEgZbN68" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id D54EB3788B; Tue, 12 Mar 2024 15:48:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6UpwDvH7h93/gm6Hf5Or40XOPaQg1YwCbVmOb8BRFxY=; b=KiUHcyzJd3lWf8j/v6mfJAiWun3fGGYpA6iG0qVSl0k3maYKbIdXQXIAPjR2Aa75y5ih/G rhuH/XWfRFXpw8BZGrqPQkm7SZEIGZ2xHFDQJ65SbQMcpJ2WpefPRgoUIeOMTiLTxWi1nh AFaZk9ZPqRCz3MatlVF/aytznBi+c1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6UpwDvH7h93/gm6Hf5Or40XOPaQg1YwCbVmOb8BRFxY=; b=oEgZbN68cE54pdTQH4E6exr8QpANho19ne7ZpnxIEold/4ZJTeYw2ItZFb2lvM7hA5Qpcj Mek/i0a/pXUzy6Ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6UpwDvH7h93/gm6Hf5Or40XOPaQg1YwCbVmOb8BRFxY=; b=KiUHcyzJd3lWf8j/v6mfJAiWun3fGGYpA6iG0qVSl0k3maYKbIdXQXIAPjR2Aa75y5ih/G rhuH/XWfRFXpw8BZGrqPQkm7SZEIGZ2xHFDQJ65SbQMcpJ2WpefPRgoUIeOMTiLTxWi1nh AFaZk9ZPqRCz3MatlVF/aytznBi+c1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258528; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6UpwDvH7h93/gm6Hf5Or40XOPaQg1YwCbVmOb8BRFxY=; b=oEgZbN68cE54pdTQH4E6exr8QpANho19ne7ZpnxIEold/4ZJTeYw2ItZFb2lvM7hA5Qpcj Mek/i0a/pXUzy6Ag== 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 935591364F; Tue, 12 Mar 2024 15:48:48 +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 mOiOImB58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:48 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , =?utf-8?q?Noralf_Tr=C3=B8nnes?= Subject: [PATCH 39/43] drm/tiny/repaper: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:34 +0100 Message-ID: <20240312154834.26178-40-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.31 X-Spamd-Result: default: False [-4.31 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLw9gjjhh8cousxs3wi4trssza)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.01)[49.15%] X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by repaper. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes --- drivers/gpu/drm/tiny/repaper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c index 8fd6758f5725f..1f78aa3d26bbd 100644 --- a/drivers/gpu/drm/tiny/repaper.c +++ b/drivers/gpu/drm/tiny/repaper.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -1118,7 +1118,7 @@ static int repaper_probe(struct spi_device *spi) DRM_DEBUG_DRIVER("SPI speed: %uMHz\n", spi->max_speed_hz / 1000000); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590189 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 975797E0F4 for ; Tue, 12 Mar 2024 15:48:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258532; cv=none; b=E3kcehdpvcGHO2zLv+w4Ko33KvBornfmJY4q4M/wEBd7Os6LXk9E+GOS25fm+5PF4e5f4PAm3OGG+R0mRe9SSB60n5Lsus8l/Tc3h89KAmr2GBibVbuOm4ZH9y/76lycRR5mmfKbkLEnfmqzV2ComSSEYQuuO3CwsgQ3vdTf66Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258532; c=relaxed/simple; bh=cG21z5zRJ+mLI2W5gF5Ld5BooEnw/2B8H0lB+RaErtE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R7s9KC++deanywR3Vi3O0+t3M/xN8yez/1UQVR9QrzrXpD1pZH6Y9BHPFhcqJOADueX50V2fwcBHXxDtuv3SS1WdfX+ut3epvgEfbK5UfCAQgrQp7j3uL6z10sx+UONE4o8jV9f5kMpUobpowp0eAL/P8+O8z2D/YbE6sNGV1p4= 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.130 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-out1.suse.de (Postfix) with ESMTPS id 298FB3788C; Tue, 12 Mar 2024 15:48:49 +0000 (UTC) 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 DD01713976; Tue, 12 Mar 2024 15:48:48 +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 CFt8NGB58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:48 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , David Lechner Subject: [PATCH 40/43] drm/tiny/st7586: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:35 +0100 Message-ID: <20240312154834.26178-41-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 298FB3788C X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by st7586. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner --- drivers/gpu/drm/tiny/st7586.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c index 7336fa1ddaed1..9e080d3b084c5 100644 --- a/drivers/gpu/drm/tiny/st7586.c +++ b/drivers/gpu/drm/tiny/st7586.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -371,7 +371,7 @@ static int st7586_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590192 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 0D19E7CF10 for ; Tue, 12 Mar 2024 15:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258532; cv=none; b=eCEw2WrpLvV7XdXCrcjol+e/5K5ugZkzGh9YaLVl3cY5orbearaQfTZOXVa0figAquZ6+6qmNpZMxTwq87n7ayqKqFNx8jroN90nb4UG3RCk48c6aCT8YyjM/m/TFK/tXH7nYBYvjNV3wuyIkZ3A22C7BpfdvXUaSpTxQnt/1VU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258532; c=relaxed/simple; bh=VDppfFcEIZ26yVt1lJEK/yQgKszZatTL8YWoTR2ptlM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PghBCeJ8ctV+sIwjBzl+fuZpyLwrkjgPOK0+JipoTXT2N1uqqhbGdOyUTl6m52cWKlTh/IPs6Zipa7yeaOLdf+4ydfKNiygZNwEjS1GJ6LGqIp4cyqcUwlcO7eW0KKHNNe5HXWkqdUi4L7EaQNqlxVOSzO7YCC77BJ2veyifv4I= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fP5z2wXT; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=8+HOXcPy; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fP5z2wXT; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=8+HOXcPy; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fP5z2wXT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="8+HOXcPy"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fP5z2wXT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="8+HOXcPy" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 72ACF3788D; Tue, 12 Mar 2024 15:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ol7aSm+N80Qv9pQUo9Esqqz5r4Ajx8xV6UnU98he6y0=; b=fP5z2wXTJgx23UZuHj7Dn3arcbyLpIachdtuAYKYbjSQFEK8kOg9OmL+FguHXCuUfUW6sf 6eZmHuUxKzDhFbPjVrE/xdNW+bO6KG9P0JoZ3XSM6sYn9PXmBtxVymx9nt/GunLDmOD2Uj eGht9t6CwSHw4HG5ksxiY46g+mEQQnA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ol7aSm+N80Qv9pQUo9Esqqz5r4Ajx8xV6UnU98he6y0=; b=8+HOXcPyVaQoIXjwXBKSxiQeZQ/W7lRuA6SEHd1DYLu49fMa1L0OSbHaJ0Bgq1PwmETyOK X5S2/azVOUw9MdBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710258529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ol7aSm+N80Qv9pQUo9Esqqz5r4Ajx8xV6UnU98he6y0=; b=fP5z2wXTJgx23UZuHj7Dn3arcbyLpIachdtuAYKYbjSQFEK8kOg9OmL+FguHXCuUfUW6sf 6eZmHuUxKzDhFbPjVrE/xdNW+bO6KG9P0JoZ3XSM6sYn9PXmBtxVymx9nt/GunLDmOD2Uj eGht9t6CwSHw4HG5ksxiY46g+mEQQnA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710258529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ol7aSm+N80Qv9pQUo9Esqqz5r4Ajx8xV6UnU98he6y0=; b=8+HOXcPyVaQoIXjwXBKSxiQeZQ/W7lRuA6SEHd1DYLu49fMa1L0OSbHaJ0Bgq1PwmETyOK X5S2/azVOUw9MdBQ== 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 3219113976; Tue, 12 Mar 2024 15:48:49 +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 YMOGCmF58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:49 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , David Lechner Subject: [PATCH 41/43] drm/tiny/st7735r: Use fbdev-dma Date: Tue, 12 Mar 2024 16:45:36 +0100 Message-ID: <20240312154834.26178-42-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.89 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,gmx.de,redhat.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.01)[49.64%] X-Spam-Score: 0.89 X-Spam-Flag: NO Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by st7735r. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner --- drivers/gpu/drm/tiny/st7735r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index 477eb36fbb70d..1676da00883d3 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -241,7 +241,7 @@ static int st7735r_probe(struct spi_device *spi) spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); + drm_fbdev_dma_setup(drm, 0); return 0; } From patchwork Tue Mar 12 15:45:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590195 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 4F05D7D066 for ; Tue, 12 Mar 2024 15:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258533; cv=none; b=Ho8ukCyOtXFea0nZuq2MjlpnmBjyOlK7J47qpfGEKC5YZO9f2uXwSLLvnY19fSbAQQWkHGRdcQCEUEyDjAwAa+Du0YF3MiIxdtjM+GsBl6CN48ukhJAWNGIkAc0KkJVFgDAFlKBt/Ggo4BGsbWXBQtSRXe6GZA9MPVNowAemsOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258533; c=relaxed/simple; bh=K+hrZfOz0EnCE936pLI4WdPPmo70ejkVtMa4/vbdepQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e0wWPAF7dDSBpdrV36KCkzroLIUTib9XYGN5q+w/ZLG08hgpx4V7vXxP4TH6/7OHi6UYDKPG7cm2j7GH4e+zEkCXabLoWHlH6HdWsLVKET899KLGr6M+/AL4sM/gjmtnjflur4iI90xJsezcLOoghEU4qrRWypQo8Exyj5ecu+U= 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.130 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-out1.suse.de (Postfix) with ESMTPS id B41E63788E; Tue, 12 Mar 2024 15:48:49 +0000 (UTC) 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 79A6B13977; Tue, 12 Mar 2024 15:48:49 +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 6FxYHGF58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:49 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 42/43] drm/fbdev-generic: Convert to fbdev-ttm Date: Tue, 12 Mar 2024 16:45:37 +0100 Message-ID: <20240312154834.26178-43-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: B41E63788E X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Only TTM-based drivers use fbdev-generic. Rename it to fbdev-ttm and change the symbol infix from _generic_ to _ttm_. Link the source file into TTM helpers, so that it is only build if TTM-based drivers have been selected. Select DRM_TTM_HELPER for loongson. Signed-off-by: Thomas Zimmermann --- Documentation/gpu/drm-kms-helpers.rst | 2 +- drivers/gpu/drm/Makefile | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 +- .../{drm_fbdev_generic.c => drm_fbdev_ttm.c} | 80 +++++++++---------- .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 +- drivers/gpu/drm/loongson/Kconfig | 1 + drivers/gpu/drm/loongson/lsdc_drv.c | 4 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 6 +- drivers/gpu/drm/qxl/qxl_drv.c | 4 +- drivers/gpu/drm/tiny/bochs.c | 4 +- drivers/gpu/drm/vboxvideo/vbox_drv.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 +- include/drm/drm_fbdev_generic.h | 15 ---- include/drm/drm_fbdev_ttm.h | 15 ++++ 14 files changed, 77 insertions(+), 77 deletions(-) rename drivers/gpu/drm/{drm_fbdev_generic.c => drm_fbdev_ttm.c} (76%) delete mode 100644 include/drm/drm_fbdev_generic.h create mode 100644 include/drm/drm_fbdev_ttm.h diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst index 59cfe8a7a8bac..e46ab9b670acd 100644 --- a/Documentation/gpu/drm-kms-helpers.rst +++ b/Documentation/gpu/drm-kms-helpers.rst @@ -116,7 +116,7 @@ fbdev Helper Functions Reference .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c :export: -.. kernel-doc:: drivers/gpu/drm/drm_fbdev_generic.c +.. kernel-doc:: drivers/gpu/drm/drm_fbdev_ttm.c :export: format Helper Functions Reference diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 50a2f0cffdac2..7bd4c525fd825 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -117,6 +117,7 @@ drm_vram_helper-y := drm_gem_vram_helper.o obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o drm_ttm_helper-y := drm_gem_ttm_helper.o +drm_ttm_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_ttm.o obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o # @@ -142,9 +143,7 @@ drm_kms_helper-y := \ drm_self_refresh_helper.o \ drm_simple_kms_helper.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o -drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += \ - drm_fbdev_generic.o \ - drm_fb_helper.o +drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o # diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6acffedf648c8..e13c03d29c162 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -2308,9 +2308,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) { /* select 8 bpp console on low vram cards */ if (adev->gmc.real_vram_size <= (32*1024*1024)) - drm_fbdev_generic_setup(adev_to_drm(adev), 8); + drm_fbdev_ttm_setup(adev_to_drm(adev), 8); else - drm_fbdev_generic_setup(adev_to_drm(adev), 32); + drm_fbdev_ttm_setup(adev_to_drm(adev), 32); } ret = amdgpu_debugfs_init(adev); diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_ttm.c similarity index 76% rename from drivers/gpu/drm/drm_fbdev_generic.c rename to drivers/gpu/drm/drm_fbdev_ttm.c index b4659cd6285ab..2114a589bd7d3 100644 --- a/drivers/gpu/drm/drm_fbdev_generic.c +++ b/drivers/gpu/drm/drm_fbdev_ttm.c @@ -10,10 +10,10 @@ #include #include -#include +#include /* @user: 1=userspace, 0=fbcon */ -static int drm_fbdev_generic_fb_open(struct fb_info *info, int user) +static int drm_fbdev_ttm_fb_open(struct fb_info *info, int user) { struct drm_fb_helper *fb_helper = info->par; @@ -24,7 +24,7 @@ static int drm_fbdev_generic_fb_open(struct fb_info *info, int user) return 0; } -static int drm_fbdev_generic_fb_release(struct fb_info *info, int user) +static int drm_fbdev_ttm_fb_release(struct fb_info *info, int user) { struct drm_fb_helper *fb_helper = info->par; @@ -34,11 +34,11 @@ static int drm_fbdev_generic_fb_release(struct fb_info *info, int user) return 0; } -FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(drm_fbdev_generic, +FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(drm_fbdev_ttm, drm_fb_helper_damage_range, drm_fb_helper_damage_area); -static void drm_fbdev_generic_fb_destroy(struct fb_info *info) +static void drm_fbdev_ttm_fb_destroy(struct fb_info *info) { struct drm_fb_helper *fb_helper = info->par; void *shadow = info->screen_buffer; @@ -56,19 +56,19 @@ static void drm_fbdev_generic_fb_destroy(struct fb_info *info) kfree(fb_helper); } -static const struct fb_ops drm_fbdev_generic_fb_ops = { +static const struct fb_ops drm_fbdev_ttm_fb_ops = { .owner = THIS_MODULE, - .fb_open = drm_fbdev_generic_fb_open, - .fb_release = drm_fbdev_generic_fb_release, - FB_DEFAULT_DEFERRED_OPS(drm_fbdev_generic), + .fb_open = drm_fbdev_ttm_fb_open, + .fb_release = drm_fbdev_ttm_fb_release, + FB_DEFAULT_DEFERRED_OPS(drm_fbdev_ttm), DRM_FB_HELPER_DEFAULT_OPS, - .fb_destroy = drm_fbdev_generic_fb_destroy, + .fb_destroy = drm_fbdev_ttm_fb_destroy, }; /* * This function uses the client API to create a framebuffer backed by a dumb buffer. */ -static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper, +static int drm_fbdev_ttm_helper_fb_probe(struct drm_fb_helper *fb_helper, struct drm_fb_helper_surface_size *sizes) { struct drm_client_dev *client = &fb_helper->client; @@ -108,7 +108,7 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper, drm_fb_helper_fill_info(info, fb_helper, sizes); - info->fbops = &drm_fbdev_generic_fb_ops; + info->fbops = &drm_fbdev_ttm_fb_ops; /* screen */ info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; @@ -137,9 +137,9 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper, return ret; } -static void drm_fbdev_generic_damage_blit_real(struct drm_fb_helper *fb_helper, - struct drm_clip_rect *clip, - struct iosys_map *dst) +static void drm_fbdev_ttm_damage_blit_real(struct drm_fb_helper *fb_helper, + struct drm_clip_rect *clip, + struct iosys_map *dst) { struct drm_framebuffer *fb = fb_helper->fb; size_t offset = clip->y1 * fb->pitches[0]; @@ -176,8 +176,8 @@ static void drm_fbdev_generic_damage_blit_real(struct drm_fb_helper *fb_helper, } } -static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper, - struct drm_clip_rect *clip) +static int drm_fbdev_ttm_damage_blit(struct drm_fb_helper *fb_helper, + struct drm_clip_rect *clip) { struct drm_client_buffer *buffer = fb_helper->buffer; struct iosys_map map, dst; @@ -201,7 +201,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper, goto out; dst = map; - drm_fbdev_generic_damage_blit_real(fb_helper, clip, &dst); + drm_fbdev_ttm_damage_blit_real(fb_helper, clip, &dst); drm_client_buffer_vunmap(buffer); @@ -211,8 +211,8 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper, return ret; } -static int drm_fbdev_generic_helper_fb_dirty(struct drm_fb_helper *helper, - struct drm_clip_rect *clip) +static int drm_fbdev_ttm_helper_fb_dirty(struct drm_fb_helper *helper, + struct drm_clip_rect *clip) { struct drm_device *dev = helper->dev; int ret; @@ -221,7 +221,7 @@ static int drm_fbdev_generic_helper_fb_dirty(struct drm_fb_helper *helper, if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2)) return 0; - ret = drm_fbdev_generic_damage_blit(helper, clip); + ret = drm_fbdev_ttm_damage_blit(helper, clip); if (drm_WARN_ONCE(dev, ret, "Damage blitter failed: ret=%d\n", ret)) return ret; @@ -234,12 +234,12 @@ static int drm_fbdev_generic_helper_fb_dirty(struct drm_fb_helper *helper, return 0; } -static const struct drm_fb_helper_funcs drm_fbdev_generic_helper_funcs = { - .fb_probe = drm_fbdev_generic_helper_fb_probe, - .fb_dirty = drm_fbdev_generic_helper_fb_dirty, +static const struct drm_fb_helper_funcs drm_fbdev_ttm_helper_funcs = { + .fb_probe = drm_fbdev_ttm_helper_fb_probe, + .fb_dirty = drm_fbdev_ttm_helper_fb_dirty, }; -static void drm_fbdev_generic_client_unregister(struct drm_client_dev *client) +static void drm_fbdev_ttm_client_unregister(struct drm_client_dev *client) { struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); @@ -252,14 +252,14 @@ static void drm_fbdev_generic_client_unregister(struct drm_client_dev *client) } } -static int drm_fbdev_generic_client_restore(struct drm_client_dev *client) +static int drm_fbdev_ttm_client_restore(struct drm_client_dev *client) { drm_fb_helper_lastclose(client->dev); return 0; } -static int drm_fbdev_generic_client_hotplug(struct drm_client_dev *client) +static int drm_fbdev_ttm_client_hotplug(struct drm_client_dev *client) { struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); struct drm_device *dev = client->dev; @@ -284,32 +284,32 @@ static int drm_fbdev_generic_client_hotplug(struct drm_client_dev *client) err_drm_fb_helper_fini: drm_fb_helper_fini(fb_helper); err_drm_err: - drm_err(dev, "fbdev: Failed to setup generic emulation (ret=%d)\n", ret); + drm_err(dev, "fbdev: Failed to setup emulation (ret=%d)\n", ret); return ret; } -static const struct drm_client_funcs drm_fbdev_generic_client_funcs = { +static const struct drm_client_funcs drm_fbdev_ttm_client_funcs = { .owner = THIS_MODULE, - .unregister = drm_fbdev_generic_client_unregister, - .restore = drm_fbdev_generic_client_restore, - .hotplug = drm_fbdev_generic_client_hotplug, + .unregister = drm_fbdev_ttm_client_unregister, + .restore = drm_fbdev_ttm_client_restore, + .hotplug = drm_fbdev_ttm_client_hotplug, }; /** - * drm_fbdev_generic_setup() - Setup generic fbdev emulation + * drm_fbdev_ttm_setup() - Setup fbdev emulation for TTM-based drivers * @dev: DRM device * @preferred_bpp: Preferred bits per pixel for the device. * - * This function sets up generic fbdev emulation for drivers that supports + * This function sets up fbdev emulation for TTM-based drivers that support * dumb buffers with a virtual address and that can be mmap'ed. - * drm_fbdev_generic_setup() shall be called after the DRM driver registered + * drm_fbdev_ttm_setup() shall be called after the DRM driver registered * the new DRM device with drm_dev_register(). * * Restore, hotplug events and teardown are all taken care of. Drivers that do * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves. * Simple drivers might use drm_mode_config_helper_suspend(). * - * In order to provide fixed mmap-able memory ranges, generic fbdev emulation + * In order to provide fixed mmap-able memory ranges, fbdev emulation * uses a shadow buffer in system memory. The implementation blits the shadow * fbdev buffer onto the real buffer in regular intervals. * @@ -318,7 +318,7 @@ static const struct drm_client_funcs drm_fbdev_generic_client_funcs = { * * The fbdev is destroyed by drm_dev_unregister(). */ -void drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) +void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp) { struct drm_fb_helper *fb_helper; int ret; @@ -329,9 +329,9 @@ void drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL); if (!fb_helper) return; - drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_generic_helper_funcs); + drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_ttm_helper_funcs); - ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_generic_client_funcs); + ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_ttm_client_funcs); if (ret) { drm_err(dev, "Failed to register client: %d\n", ret); goto err_drm_client_init; @@ -346,4 +346,4 @@ void drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) kfree(fb_helper); return; } -EXPORT_SYMBOL(drm_fbdev_generic_setup); +EXPORT_SYMBOL(drm_fbdev_ttm_setup); diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 57c21ec452b70..9f9b19ea05879 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -339,7 +339,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev, goto err_unload; } - drm_fbdev_generic_setup(dev, 32); + drm_fbdev_ttm_setup(dev, 32); return 0; diff --git a/drivers/gpu/drm/loongson/Kconfig b/drivers/gpu/drm/loongson/Kconfig index 8e59753e532de..9ed463a76ae29 100644 --- a/drivers/gpu/drm/loongson/Kconfig +++ b/drivers/gpu/drm/loongson/Kconfig @@ -6,6 +6,7 @@ config DRM_LOONGSON depends on LOONGARCH || MIPS || COMPILE_TEST select DRM_KMS_HELPER select DRM_TTM + select DRM_TTM_HELPER select I2C select I2C_ALGOBIT help diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c index d8ff60b46abe6..adc7344d2f807 100644 --- a/drivers/gpu/drm/loongson/lsdc_drv.c +++ b/drivers/gpu/drm/loongson/lsdc_drv.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -314,7 +314,7 @@ static int lsdc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) return ret; - drm_fbdev_generic_setup(ddev, 32); + drm_fbdev_ttm_setup(ddev, 32); return 0; } diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index a947e1d5f309a..a58c31089613e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include @@ -846,9 +846,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev, goto fail_drm_dev_init; if (nouveau_drm(drm_dev)->client.device.info.ram_size <= 32 * 1024 * 1024) - drm_fbdev_generic_setup(drm_dev, 8); + drm_fbdev_ttm_setup(drm_dev, 8); else - drm_fbdev_generic_setup(drm_dev, 32); + drm_fbdev_ttm_setup(drm_dev, 32); quirk_broken_nv_runpm(pdev); return 0; diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index beee5563031aa..5eb3f5719fdf3 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -118,7 +118,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto modeset_cleanup; - drm_fbdev_generic_setup(&qdev->ddev, 32); + drm_fbdev_ttm_setup(&qdev->ddev, 32); return 0; modeset_cleanup: diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index c23c9f0cf49cb..2d7ad808cc0e2 100644 --- a/drivers/gpu/drm/tiny/bochs.c +++ b/drivers/gpu/drm/tiny/bochs.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -670,7 +670,7 @@ static int bochs_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent if (ret) goto err_hw_fini; - drm_fbdev_generic_setup(dev, 32); + drm_fbdev_ttm_setup(dev, 32); return ret; err_hw_fini: diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c index cd9e66a06596a..ef36834c8673c 100644 --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -80,7 +80,7 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto err_irq_fini; - drm_fbdev_generic_setup(&vbox->ddev, 32); + drm_fbdev_ttm_setup(&vbox->ddev, 32); return 0; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index d3e308fdfd5be..9fcbd640278bb 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include @@ -1676,7 +1676,7 @@ static int vmw_probe(struct pci_dev *pdev, const struct pci_device_id *ent) vmw_fifo_resource_inc(vmw); vmw_svga_enable(vmw); - drm_fbdev_generic_setup(&vmw->drm, 0); + drm_fbdev_ttm_setup(&vmw->drm, 0); vmw_debugfs_gem_init(vmw); vmw_debugfs_resource_managers_init(vmw); diff --git a/include/drm/drm_fbdev_generic.h b/include/drm/drm_fbdev_generic.h deleted file mode 100644 index 75799342098dc..0000000000000 --- a/include/drm/drm_fbdev_generic.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: MIT */ - -#ifndef DRM_FBDEV_GENERIC_H -#define DRM_FBDEV_GENERIC_H - -struct drm_device; - -#ifdef CONFIG_DRM_FBDEV_EMULATION -void drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp); -#else -static inline void drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) -{ } -#endif - -#endif diff --git a/include/drm/drm_fbdev_ttm.h b/include/drm/drm_fbdev_ttm.h new file mode 100644 index 0000000000000..9e6c3bdf35376 --- /dev/null +++ b/include/drm/drm_fbdev_ttm.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef DRM_FBDEV_TTM_H +#define DRM_FBDEV_TTM_H + +struct drm_device; + +#ifdef CONFIG_DRM_FBDEV_EMULATION +void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp); +#else +static inline void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp) +{ } +#endif + +#endif From patchwork Tue Mar 12 15:45:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13590194 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 807757CF35 for ; Tue, 12 Mar 2024 15:48:51 +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=1710258533; cv=none; b=AKeAiOVkObNk/4p190+Cm4ql62Y8MRqbgfbF67lAQ/PqlBN0WPs/OkEndB7da0hx2d5rtTeUE5RoBbfrH9b8pGJV2V+AHzBEtDQUuQn/hn2TMd6hTo0+xClj5eCSkPUIsBTgZQ2K/d3f4kv5Wr03tEqRaVKr70b1tLkTreRrljU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258533; c=relaxed/simple; bh=YiYtW10jzl2U1edSkfKWrE1+qz2qy6AA1x2PYUD1xzo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jnvGUxb2bov8UBF5boe4QQgwF/ayVQC2cncXFmlbQFtIanKZoOs+DsRNVNLOQW3Gb+cKz8toVsTAXp7VWah2CMt5axccslzrSy/92I9/kV2+TROOYpLgLOQFVx8CE0siS7soDcWRnVeP8DBg1dusDF+DZAoHtymFdqjmrEKpeU4= 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 077595D6DF; Tue, 12 Mar 2024 15:48:50 +0000 (UTC) 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 BC0651364F; Tue, 12 Mar 2024 15:48:49 +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 QDx/LGF58GUhPwAAD6G6ig (envelope-from ); Tue, 12 Mar 2024 15:48:49 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Jonathan Corbet Subject: [PATCH 43/43] drm/fbdev: Clean up fbdev documentation Date: Tue, 12 Mar 2024 16:45:38 +0100 Message-ID: <20240312154834.26178-44-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de> References: <20240312154834.26178-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 077595D6DF X-Spam-Flag: NO X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Rewrite some docs that are not up-to-date any longer. Remove the TODO item for fbdev-generic conversion, as the helper has been replaced. Make documentation for DMA, SHMEM and TTM emulation available. Signed-off-by: Thomas Zimmermann Cc: Jonathan Corbet --- Documentation/gpu/drm-kms-helpers.rst | 12 +++++++++--- Documentation/gpu/todo.rst | 13 ------------- drivers/gpu/drm/drm_drv.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 11 ++--------- include/drm/drm_mode_config.h | 4 ++-- 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst index e46ab9b670acd..8435e8621cc08 100644 --- a/Documentation/gpu/drm-kms-helpers.rst +++ b/Documentation/gpu/drm-kms-helpers.rst @@ -110,15 +110,21 @@ fbdev Helper Functions Reference .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c :doc: fbdev helpers -.. kernel-doc:: include/drm/drm_fb_helper.h - :internal: +.. kernel-doc:: drivers/gpu/drm/drm_fbdev_dma.c + :export: -.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c +.. kernel-doc:: drivers/gpu/drm/drm_fbdev_shmem.c :export: .. kernel-doc:: drivers/gpu/drm/drm_fbdev_ttm.c :export: +.. kernel-doc:: include/drm/drm_fb_helper.h + :internal: + +.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c + :export: + format Helper Functions Reference ================================= diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index fb9ad120b1414..e2a0585915b32 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -243,19 +243,6 @@ Contact: Maintainer of the driver you plan to convert Level: Intermediate -Convert drivers to use drm_fbdev_generic_setup() ------------------------------------------------- - -Most drivers can use drm_fbdev_generic_setup(). Driver have to implement -atomic modesetting and GEM vmap support. Historically, generic fbdev emulation -expected the framebuffer in system memory or system-like memory. By employing -struct iosys_map, drivers with frambuffers in I/O memory can be supported -as well. - -Contact: Maintainer of the driver you plan to convert - -Level: Intermediate - Reimplement functions in drm_fbdev_fb_ops without fbdev ------------------------------------------------------- diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 243cacb3575c0..cfcd45480d326 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -345,7 +345,7 @@ void drm_minor_release(struct drm_minor *minor) * if (ret) * return ret; * - * drm_fbdev_generic_setup(drm, 32); + * drm_fbdev_{...}_setup(drm, 32); * * return 0; * } diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index d612133e2cf7e..e2e19f49342e1 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -85,12 +85,8 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); * The fb helper functions are useful to provide an fbdev on top of a drm kernel * mode setting driver. They can be used mostly independently from the crtc * helper functions used by many drivers to implement the kernel mode setting - * interfaces. - * - * Drivers that support a dumb buffer with a virtual address and mmap support, - * should try out the generic fbdev emulation using drm_fbdev_generic_setup(). - * It will automatically set up deferred I/O if the driver requires a shadow - * buffer. + * interfaces. Drivers that use one of the shared memory managers, TTM, SHMEM, + * DMA, should instead use the corresponding fbdev emulation. * * Existing fbdev implementations should restore the fbdev console by using * drm_fb_helper_lastclose() as their &drm_driver.lastclose callback. @@ -126,9 +122,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); * atomic context. If drm_fb_helper_deferred_io() is used as the deferred_io * callback it will also schedule dirty_work with the damage collected from the * mmap page writes. - * - * Deferred I/O is not compatible with SHMEM. Such drivers should request an - * fbdev shadow buffer and call drm_fbdev_generic_setup() instead. */ static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc) diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 973119a9176b2..1e4b8d01212e6 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -106,8 +106,8 @@ struct drm_mode_config_funcs { * Drivers implementing fbdev emulation use drm_kms_helper_hotplug_event() * to call this hook to inform the fbdev helper of output changes. * - * This hook is deprecated, drivers should instead use - * drm_fbdev_generic_setup() which takes care of any necessary + * This hook is deprecated, drivers should instead implement fbdev + * support with struct drm_client, which takes care of any necessary * hotplug event forwarding already without further involvement by * the driver. */