Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1309235lqm; Thu, 2 May 2024 10:39:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWPlg+1CNt5QObjQcYQGUulS3OW8josZwKTwwF2VaP+NJT5JqFICn8Z89O467DMol9LdVTVB4O065DmNZS9ecDBvsqv2okr2Udm5zzKpw== X-Google-Smtp-Source: AGHT+IF8lQySEIJo3eyqY1PoPuNEM7cTe9z1u5jY51w7iMH5IWaAgABB4snNEcdnbGA7AdTA7kvQ X-Received: by 2002:a17:903:230b:b0:1ea:6fb2:5a88 with SMTP id d11-20020a170903230b00b001ea6fb25a88mr407775plh.68.1714671555768; Thu, 02 May 2024 10:39:15 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z3-20020a170902d54300b001e3e3adea66si1413153plf.641.2024.05.02.10.39.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 10:39:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166789-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=jiZfa1AR; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-166789-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 44EC728BF14 for ; Thu, 2 May 2024 17:29:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95C1916FF4B; Thu, 2 May 2024 17:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jiZfa1AR" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 4A61216FF45 for ; Thu, 2 May 2024 17:29:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714670943; cv=none; b=NtgzUbTWIdbGz6DVChOeNIqXvNvkM5O76o1RBmmzGSFScv4UxJhjdeefK6/hf1GTLoHbULwNksXQPJJLr48MUGCLguJ0eT3dg5gG8+LuhOGATJR3tmpvXF/WDMqgLjWYXIcEJwSFIoe0McFsfeE4d2HtY9u3ighDhMHHDRSBSLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714670943; c=relaxed/simple; bh=W3wEH25DHJLHiCPlwZANF0yYSmqELTFyIGYQeEpRKmA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KLNJ9ff0tw5f7t59FhvTj/k+peHNa7Gzuy70lOtkCc4AjHOopRTz0lFa3k1Wa7oxku9i7NMTviwo1T+EX9nn26jv/sBWOW7qfNNPwAxQLO2Dmk08D7JeoUPJc8vXppQhW1FPHobJqOED5k6De/l30aWVI0iotbY/RGy1IfJX7Rc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jiZfa1AR; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714670942; x=1746206942; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=W3wEH25DHJLHiCPlwZANF0yYSmqELTFyIGYQeEpRKmA=; b=jiZfa1ARf0jy0two926KYQ11golknejWfHzu3Tmxav/v1ClQUH2m0Pf0 40HI0YNgTGdbQR90h83k9fA99mGON3pUZqor1kKodEg+WGuHJcqauhPZ+ cT3dqdc0+F8HAMSZSjFWOGBFONk8FgHXur1ZCi19cDgglbVeZV89Ig/2s 6dChBwTbYs2ssWnmarreW2CcMeChMhHcQsuk4vIPulhblCky1kkhIqG4V 7S5N2LnTPmp45sGkPY08j68sTfVLf2DEDuZsfKdHrt9B9iTYslNMKcRzz CClrfs7B7ibi0LMPdcPphkdC9huu0OMlImhHN1P9OCxxYRRL71R+MhyFa w==; X-CSE-ConnectionGUID: 3chX9iwQSiy/hENRbh+UwA== X-CSE-MsgGUID: V9vomwF9ROGTrRAeWm9pVg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="13402595" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="13402595" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 10:29:01 -0700 X-CSE-ConnectionGUID: aCYIlScVTP2S9e6aZ/C8ew== X-CSE-MsgGUID: lJ7oDaAsSfmEpLVMgls8yA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="31987099" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa004.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 10:28:56 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1s2aEl-00000003Op1-3di1; Thu, 02 May 2024 20:28:51 +0300 Date: Thu, 2 May 2024 20:28:51 +0300 From: Andy Shevchenko To: Sui Jingfeng 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 Subject: Re: [v1,1/3] drm/panel: ili9341: Correct use of device property APIs Message-ID: References: <20240425142706.2440113-2-andriy.shevchenko@linux.intel.com> <9e69b129-7539-4403-a621-bf3775aab995@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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. > > 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. -- With Best Regards, Andy Shevchenko