Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1566967lqm; Thu, 2 May 2024 21:58:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+UGjGbXx0mrLiNruPRIt7c8aype5CddbAiO0UBqv//eY63jvMgkxZap1MwIN3pWTkc+CxflisOY33jVBjlQIV9CbkyNM6BnWd4zWm4g== X-Google-Smtp-Source: AGHT+IEFUlHFbfIYDnp1H1asQJbwuzKEQVLD2l1+Efpanfb4ABrdfZNEnfhEM/6um4JHCagLAqJ0 X-Received: by 2002:a05:6a20:96db:b0:1aa:674a:94e0 with SMTP id hq27-20020a056a2096db00b001aa674a94e0mr1586135pzc.43.1714712287129; Thu, 02 May 2024 21:58:07 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o16-20020a170902d4d000b001e3cd26cef3si2349956plg.503.2024.05.02.21.58.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167253-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=neutral (body hash did not verify) header.i=@linux.dev header.s=key1 header.b=cWkNpHNc; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-167253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 BD9CFB218F8 for ; Fri, 3 May 2024 04:58:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1EA613957E; Fri, 3 May 2024 04:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="cWkNpHNc" Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B0656A003 for ; Fri, 3 May 2024 04:57:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714712275; cv=none; b=fd1uuPWR6Ul1xbHiUOZk1NPKsVlRnNbp7BxWtsnc7kBnPaTWoPgMOaBnrEe6KyRrjGqQuXKpharKdeRI9/x2XRndOWNeHEeEEckhYT68/a8GjEjhUJSvyT+x2CBMStXqWaM3tr99hxkReU4RmDv/QKpoqq4EjefFdEGHoJRTg8c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714712275; c=relaxed/simple; bh=GTeOd0oq0fTMidocIfaQ5BcfghD8+EUvjz3d6M01P3g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a8PwDglumxtuAh8ocCf1HvS5gb4E7YVCWn6ByK2k1vTws/VskCDqNGG+Z57PvIzzl4sUWkrzP3MXsaoeraf5tW0Urn0KM5PKAOdipThS7hek7JmMgxlt1qcJOD9CfD3NOWi2sDEZ/phmWRoLJ5yCP+yI1khc4/uSNy+gKqRv0Q0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=cWkNpHNc; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714712271; h=from:from:reply-to:subject:subject: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=1bjK9PtJs5eiMbNc1nzVSEvcIBcaBcUO/u0dG22mt5E=; b=cWkNpHNcQE6f6fdSRfj7KFFTa06VHrf/73JiA9/J33usVpLl+8dqzHDvQnXW98QrgdqEU4 YuFB99NnuSD0Uxnj6fog0Ka49ADV9JxtvXHAIhXGCmTLMg0HST90JDJkH9k1ml7EFXNtas IhfhUKHcRhRFy54Q3k6Oyawp0WANllQ= Date: Fri, 3 May 2024 12:57:33 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [v1,1/3] drm/panel: ili9341: Correct use of device property APIs To: Andy Shevchenko Cc: Neil Armstrong , Randy Dunlap , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter References: <20240425142706.2440113-2-andriy.shevchenko@linux.intel.com> <9e69b129-7539-4403-a621-bf3775aab995@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi, On 2024/5/3 01:28, Andy Shevchenko wrote: > On Fri, May 03, 2024 at 12:25:17AM +0800, Sui Jingfeng wrote: >> On 2024/5/2 16:32, Andy Shevchenko wrote: >>> On Wed, May 01, 2024 at 12:27:14AM +0800, Sui Jingfeng wrote: >>>> On 2024/4/30 22:13, Andy Shevchenko wrote: >>>>> On Fri, Apr 26, 2024 at 05:13:43AM +0800, Sui Jingfeng wrote: > ... > >>>>> the former might be subdivided to "is it swnode backed or real fwnode one?" >>>>> >>>> Yeah, >>>> On non-DT cases, it can be subdivided to swnode backed case and ACPI fwnode backed case. >>>> >>>> - For swnode backed case: the device_get_match_data() don't has a implemented backend. >>>> - For ACPI fwnode backed case: the device_get_match_data() has a implemented backend. >>>> >>>> But the driver has *neither* software node support >>> True. >>> >>>> nor ACPI support, >>> Not true. >> Why this is not true? Are you means that the panel-ilitek-ili9341 driver has ACPI support? > That's the idea (as far as I see the copy of the code from tinyDRM), > but broken over the copy'n'paste. This patch rectifies that to be > in align with the original code, which *does* support ACPI. > >> I'm asking because I don't see struct acpi_device_id related stuff in that source file, >> am I miss something? > Yes, you are. I leave it for you to research. > After researching a few hours I still don't understand how does the panel-ilitek-ili9341 driver has the ACPI support and be able to ACPI probed when compiled as module. As far as I know, drivers that has the ACPI support *must* has the acpi_match_table hooked, so that be able to be probed when the driver is compiled as a module. For example, see commit 75a1b44a54bd9 ("spi: tegra210-quad: add acpi support") to get a feel what a SPI device with *real* ACPI support looks like. I have double checked the panel-ilitek-ili9341 driver, it doesn't has acpi_match_table hooked, which means that this driver won't even be able probed. And probed as pure SPI device still out of the scope of "correct use of device property APIs". Because SPI device specific method don't belong to the device property API. I don't really know what's we are missing, but we already intend to let it go, thanks. >>> So, slow down and take your time to get into the code and understand how it works. >>> >>>> so that the rotation property can not get and ili9341_dpi_probe() will fails. >>>> So in total, this is not a 100% correct use of device property APIs. >>>> >>>> But I'm fine that if you want to leave(ignore) those less frequent use cases temporarily, >>>> there may have programmers want to post patches, to complete the missing in the future. >>>> >>>> So, there do have some gains on non-DT cases. >>>> >>>> - As you make it be able to compiled on X86 with the drm-misc-defconfig. >>>> - You cleanup the code up (at least patch 2 in this series is no obvious problem). >>>> - You allow people to modprobe it, and maybe half right and half undefined. >>>> >>>> But you do helps moving something forward, so congratulations for the wake up. -- Best regards, Sui