dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Chris Bainbridge <chris.bainbridge@gmail.com>,
	kernel test robot <lkp@intel.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	hughsient@gmail.com
Subject: Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization
Date: Thu, 6 Jun 2024 15:31:34 +0300	[thread overview]
Message-ID: <ZmGsJsXhHcPV48XJ@intel.com> (raw)
In-Reply-To: <87h6e6bkpo.fsf@intel.com>

On Thu, Jun 06, 2024 at 10:21:07AM +0300, Jani Nikula wrote:
> On Wed, 05 Jun 2024, Chris Bainbridge <chris.bainbridge@gmail.com> wrote:
> > On Tue, Jun 04, 2024 at 10:02:29AM +0800, kernel test robot wrote:
> >> Hi Mario,
> >> 
> >> kernel test robot noticed the following build errors:
> >> 
> >> [auto build test ERROR on drm-misc/drm-misc-next]
> >> [also build test ERROR on drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.10-rc2 next-20240603]
> >> [If your patch is applied to the wrong git tree, kindly drop us a note.
> >> And when submitting patch, we suggest to use '--base' as documented in
> >> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >> 
> >> url:    https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/drm-client-Detect-when-ACPI-lid-is-closed-during-initialization/20240529-050440
> >> base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
> >> patch link:    https://lore.kernel.org/r/20240528210319.1242-1-mario.limonciello%40amd.com
> >> patch subject: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization
> >> config: i386-randconfig-053-20240604 (https://download.01.org/0day-ci/archive/20240604/202406040928.Eu1gRIWv-lkp@intel.com/config)
> >> compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0
> >> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406040928.Eu1gRIWv-lkp@intel.com/reproduce)
> >> 
> >> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >> the same patch/commit), kindly add following tags
> >> | Reported-by: kernel test robot <lkp@intel.com>
> >> | Closes: https://lore.kernel.org/oe-kbuild-all/202406040928.Eu1gRIWv-lkp@intel.com/
> >> 
> >> All errors (new ones prefixed by >>):
> >> 
> >>    ld: drivers/gpu/drm/drm_client_modeset.o: in function `drm_client_match_edp_lid':
> >> >> drivers/gpu/drm/drm_client_modeset.c:281:(.text+0x221b): undefined reference to `acpi_lid_open'
> >> 
> >> 
> >> vim +281 drivers/gpu/drm/drm_client_modeset.c
> >> 
> >>    260	
> >>    261	static void drm_client_match_edp_lid(struct drm_device *dev,
> >>    262					     struct drm_connector **connectors,
> >>    263					     unsigned int connector_count,
> >>    264					     bool *enabled)
> >>    265	{
> >>    266		int i;
> >>    267	
> >>    268		for (i = 0; i < connector_count; i++) {
> >>    269			struct drm_connector *connector = connectors[i];
> >>    270	
> >>    271			switch (connector->connector_type) {
> >>    272			case DRM_MODE_CONNECTOR_LVDS:
> >>    273			case DRM_MODE_CONNECTOR_eDP:
> >>    274				if (!enabled[i])
> >>    275					continue;
> >>    276				break;
> >>    277			default:
> >>    278				continue;
> >>    279			}
> >>    280	
> >>  > 281			if (!acpi_lid_open()) {
> >>    282				drm_dbg_kms(dev, "[CONNECTOR:%d:%s] lid is closed, disabling\n",
> >>    283					    connector->base.id, connector->name);
> >>    284				enabled[i] = false;
> >>    285			}
> >>    286		}
> >>    287	}
> >>    288	
> >> 
> >> -- 
> >> 0-DAY CI Kernel Test Service
> >> https://github.com/intel/lkp-tests/wiki
> >
> > The failed config has CONFIG_ACPI_BUTTON=m. The build failure can be
> > fixed with:
> >
> > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> > index b76438c31761..0271e66f44f8 100644
> > --- a/drivers/gpu/drm/drm_client_modeset.c
> > +++ b/drivers/gpu/drm/drm_client_modeset.c
> > @@ -271,11 +271,13 @@ static void drm_client_match_edp_lid(struct drm_device *dev,
> >                 if (connector->connector_type != DRM_MODE_CONNECTOR_eDP || !enabled[i])
> >                         continue;
> >
> > +#if defined(CONFIG_ACPI_BUTTON)
> >                 if (!acpi_lid_open()) {
> >                         drm_dbg_kms(dev, "[CONNECTOR:%d:%s] lid is closed, disabling\n",
> >                                     connector->base.id, connector->name);
> >                         enabled[i] = false;
> >                 }
> > +#endif
> >         }
> >  }
> 
> No. This is because
> 
> CONFIG_DRM=y
> CONFIG_ACPI_BUTTON=m
> 
> The pedantically correct fix is probably having DRM
> 
> 	depends on ACPI_BUTTON || ACPI_BUTTON=n
> 
> but seeing how i915 and xe just
> 
> 	select ACPI_BUTTON if ACPI

Huh. We should nuke that as we haven't used this lid stuff in ages.

-- 
Ville Syrjälä
Intel

      reply	other threads:[~2024-06-06 12:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 21:03 [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization Mario Limonciello
2024-05-29 13:33 ` Alex Deucher
2024-05-29 13:51   ` Jani Nikula
2024-05-29 13:55     ` Alex Deucher
2024-05-29 14:34       ` Mario Limonciello
2024-05-29 14:14 ` Ville Syrjälä
2024-05-29 14:45   ` Mario Limonciello
2024-05-29 15:39     ` Ville Syrjälä
2024-05-29 16:26       ` Mario Limonciello
2024-05-29 17:55       ` Dmitry Baryshkov
2024-05-30  4:41         ` Limonciello, Mario
2024-05-30  8:07           ` Dmitry Baryshkov
2024-05-30 20:44             ` Dmitry Torokhov
2024-06-04  2:02 ` kernel test robot
2024-06-05 15:08   ` Chris Bainbridge
2024-06-06  7:21     ` Jani Nikula
2024-06-06 12:31       ` Ville Syrjälä [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZmGsJsXhHcPV48XJ@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chris.bainbridge@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hughsient@gmail.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=mripard@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).