Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp234227lqp; Tue, 11 Jun 2024 02:56:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoajhj4GtuE6+ODs1d5uILgt4Em6+GYA6mzbwGx5t0sZIo1JXZgp0xM+ijGqxyh5kDIM0aKDXMx5NPd7wbed++IbLKIyAKFpdKwqqgdg== X-Google-Smtp-Source: AGHT+IHLlrLfoCKEK3EClstbq7bms+RMlO05GKF28f/Q8TSeU65GAvBw8RAYl3V5xG/hdffxU3Ux X-Received: by 2002:a05:6e02:b4f:b0:375:aaaf:e88f with SMTP id e9e14a558f8ab-375aaafef12mr52072205ab.27.1718099769797; Tue, 11 Jun 2024 02:56:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718099769; cv=pass; d=google.com; s=arc-20160816; b=S84G54TMArspbMI6OD0H31JD1HBj0AN4cJ0Xl8S3T7dH5jBhxgaCdTW47gdJh4phwC wNwo8LPldgWkz2h/etccNUttd5oiYi5geCyn8Fo5ZV8Jg4N7ImNtsq/4fhULmC2+kGOW 7scidNYlum75yNjdYaQT5d32QBKjfeIHpl8UUiXdwpngSp5g8s0R+hV0GTi20kS9dOSl JnkqyiGqnC01tWO/rOY7EB+d4jsPpPNUMn0WmaGq7RHRApW1gTg4AMPk12+3HGFS+ELH aPzQoQNq3hrku4hgeMpEwWtbbitUBpY9xFZZBc+VxiL8ultcrbP9s4ygWTuRrc4Zhweq bnNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=s/o7VjVdqSKyQbEH+helGX2BBAgyr/42owpuqUXceM0=; fh=sbuUteBaWfQRm28yBC+az1nm+K0esTGs8glJBsKykuc=; b=KP0JD7qibUorebXwyO1owhKlelt3gwXAyf2XoUI1IFm6SdqnB4y48a91ms+y6rhGlX pEkIvme17wrfPYWqudnq10WWWFPAmnoJuX5j7pT9upUuSRxdXbqtptSz8Fh2D7cS7MMB LNCjujk+k2UCxUwpolmAPkJ2tq1BwUTJbQw2biCdgJy6unPU9xTwenNAIy96rcloHGFS Nk9sopdBixy94+zAQGQJvsAjEbRhiisjpIkvts9rSvSheS1GuOEDVJ3IynlFlrf3f1hB 3DjoEgikkOD3WYv8dkiSwZu6MyYGB78TiggyyghofYQO4SIWjUTtKGGk8bRhVy/7Mv6K ur+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AaByh0sr; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AaByh0sr; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-209565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6ec18316582si3885609a12.771.2024.06.11.02.56.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 02:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AaByh0sr; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AaByh0sr; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-209565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 13F15B23666 for ; Tue, 11 Jun 2024 09:30:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84D9B178382; Tue, 11 Jun 2024 09:30:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AaByh0sr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AiMsvu2C"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AaByh0sr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AiMsvu2C" 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 BAE9816F8F0 for ; Tue, 11 Jun 2024 09:30:01 +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=1718098203; cv=none; b=g3s+x4yOeTD+TsXwkLy4Ht3DMMzFJvEcnY0h4/a/nEh6MxS2wZbAg5oqRF01oG5gIr2Zi6PfcTcYGqHtuwXO4wFyA9Ujt84rMk71Y7T+CU01iqFis5YzWaB+Ox8huiLgTQV8DLf33husMp9IjMl9lwbm4FYICI2g6xXfCabUaoQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718098203; c=relaxed/simple; bh=s1dnQlqbB+oKn6d4e+SsAyCH94pCIYjTwN23JQQSAdk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=E9tVaSHD1cJt1Qcae+IK66YVanDqijJHFjO8VSiCwNTBawS8rBVZTXaAjOqMWP7JGcVBtKLR146g/623WUIQvjNRL2xZa7jmJi6wCEDzIdjOdcGIu+6JnpM4I9N0zNOx3rntQ7n6gj/O7uv8YGHm8HW23PUk7KGu0rd+Id8aYpo= 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=AaByh0sr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AiMsvu2C; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AaByh0sr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AiMsvu2C; 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 (unknown [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 9170822E1F; Tue, 11 Jun 2024 09:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718098199; 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:autocrypt:autocrypt; bh=s/o7VjVdqSKyQbEH+helGX2BBAgyr/42owpuqUXceM0=; b=AaByh0srZuo09sSn0VzAJHHjwggDxW+xTBhD8+R5edDdbvE1QuAyu8dO8CMxyvqPNjE67n w2FaNLWwFCnO3UTstj9JEh+1Fz5t4DvPjShtWfEXmgfqxnkyeVCnIC6vD2KwgcdEXgDC8Z 2QTqBaUTWr5EOWRPjeaRbmYs07UexB0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718098199; 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:autocrypt:autocrypt; bh=s/o7VjVdqSKyQbEH+helGX2BBAgyr/42owpuqUXceM0=; b=AiMsvu2CXcGwvNRRk2YapVJJSfp0YAhg+3aQZ+elkwqZGzEPDZfpTC+/RAoiOOLhrB+NUl ofsAQXm3eKfqTXDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718098199; 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:autocrypt:autocrypt; bh=s/o7VjVdqSKyQbEH+helGX2BBAgyr/42owpuqUXceM0=; b=AaByh0srZuo09sSn0VzAJHHjwggDxW+xTBhD8+R5edDdbvE1QuAyu8dO8CMxyvqPNjE67n w2FaNLWwFCnO3UTstj9JEh+1Fz5t4DvPjShtWfEXmgfqxnkyeVCnIC6vD2KwgcdEXgDC8Z 2QTqBaUTWr5EOWRPjeaRbmYs07UexB0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718098199; 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:autocrypt:autocrypt; bh=s/o7VjVdqSKyQbEH+helGX2BBAgyr/42owpuqUXceM0=; b=AiMsvu2CXcGwvNRRk2YapVJJSfp0YAhg+3aQZ+elkwqZGzEPDZfpTC+/RAoiOOLhrB+NUl ofsAQXm3eKfqTXDw== 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 5249A13A55; Tue, 11 Jun 2024 09:29:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id JI2iEhcZaGYkcwAAD6G6ig (envelope-from ); Tue, 11 Jun 2024 09:29:59 +0000 Message-ID: <6c01bee4-c3f5-496e-8b4f-a29c97954808@suse.de> Date: Tue, 11 Jun 2024 11:29:58 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/fbdev-dma: fix getting smem_start To: Peng Fan , "Peng Fan (OSS)" , Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , Javier Martinez Canillas Cc: "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" References: <20240604080328.4024838-1-peng.fan@oss.nxp.com> <8f4a6d80-dd3e-422f-88af-d26f50c973ff@suse.de> <766908de-922c-4d71-bb04-29dbe4d1d64d@suse.de> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAHNJ1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPsLAjgQTAQgAOAIb AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftODH AAoJEGgNwR1TC3ojx1wH/0hKGWugiqDgLNXLRD/4TfHBEKmxIrmfu9Z5t7vwUKfwhFL6hqvo lXPJJKQpQ2z8+X2vZm/slsLn7J1yjrOsoJhKABDi+3QWWSGkaGwRJAdPVVyJMfJRNNNIKwVb U6B1BkX2XDKDGffF4TxlOpSQzdtNI/9gleOoUA8+jy8knnDYzjBNOZqLG2FuTdicBXblz0Mf vg41gd9kCwYXDnD91rJU8tzylXv03E75NCaTxTM+FBXPmsAVYQ4GYhhgFt8S2UWMoaaABLDe 7l5FdnLdDEcbmd8uLU2CaG4W2cLrUaI4jz2XbkcPQkqTQ3EB67hYkjiEE6Zy3ggOitiQGcqp j//OwE0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRHUE9eosYb T6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgTRjP+qbU6 3Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+RdhgATnWW GKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zbehDda8lv hFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r12+lqdsA EQEAAcLAdgQYAQgAIAIbDBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftOH6AAoJEGgNwR1T C3ojVSkIALpAPkIJPQoURPb1VWjh34l0HlglmYHvZszJWTXYwavHR8+k6Baa6H7ufXNQtThR yIxJrQLW6rV5lm7TjhffEhxVCn37+cg0zZ3j7zIsSS0rx/aMwi6VhFJA5hfn3T0TtrijKP4A SAQO9xD1Zk9/61JWk8OysuIh7MXkl0fxbRKWE93XeQBhIJHQfnc+YBLprdnxR446Sh8Wn/2D Ya8cavuWf2zrB6cZurs048xe0UbSW5AOSo4V9M0jzYI4nZqTmPxYyXbm30Kvmz0rYVRaitYJ 4kyYYMhuULvrJDMjZRvaNe52tkKAvMevcGdt38H4KSVXAylqyQOW5zvPc4/sq9c= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spamd-Result: default: False [-4.29 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_TO(0.00)[nxp.com,oss.nxp.com,linux.intel.com,kernel.org,gmail.com,ffwll.ch,redhat.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_SEVEN(0.00)[9]; MID_RHS_MATCH_FROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo] X-Spam-Score: -4.29 X-Spam-Flag: NO Hi Am 11.06.24 um 10:23 schrieb Peng Fan: >> Subject: Re: [PATCH] drm/fbdev-dma: fix getting smem_start >> >> Hi >> >> Am 11.06.24 um 03:00 schrieb Peng Fan: >>>> Subject: Re: [PATCH] drm/fbdev-dma: fix getting smem_start >>>> >>>> Hi >>>> >>>> Am 04.06.24 um 10:03 schrieb Peng Fan (OSS): >>>>> From: Peng Fan >>>>> >>>>> If 'info->screen_buffer' locates in vmalloc address space, >>>>> virt_to_page will not be able to get correct results. With >>>>> CONFIG_DEBUG_VM and CONFIG_DEBUG_VIRTUAL enabled on ARM64, >>>> there is dump below: >>>> >>>> Which graphics driver triggers this bug? >>> It is NXP i.MX95 DPU driver which is still in NXP downstream repo. >> Which DRM memory manager does that driver use? > DRM_GEM_DMA_DRIVER_OPS So fbdev-dma would be correct. But with the gem-dma allocator, wouldn't you allocate from one of these dma_alloc_() calls at [1] ? How does the drivers end up with vmalloc'd fbdev memory? Specifically in the light of the docs at [2]. [1] https://elixir.bootlin.com/linux/v6.9/source/drivers/gpu/drm/drm_gem_dma_helper.c#L146 [2] https://elixir.bootlin.com/linux/v6.9/source/Documentation/core-api/dma-api-howto.rst#L124 Best regards Thomas > >> I'm asking because if the driver allocates BOs via vmalloc(), should it really >> use fbdev-dma? > We use it for fbdev emulation. If drm_kms_helper.fbdev_emulation is 0, > fbdev emulation could be disabled. > > Thanks > Peng >> Best regards >> Thomas >> >>> Thanks, >>> Peng. >> -- >> -- >> Thomas Zimmermann >> Graphics Driver Developer >> SUSE Software Solutions Germany GmbH >> Frankenstrasse 146, 90461 Nuernberg, Germany >> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB >> 36809 (AG Nuernberg) -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)