From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B90DC001DF for ; Tue, 25 Jul 2023 12:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233373AbjGYMT1 (ORCPT ); Tue, 25 Jul 2023 08:19:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbjGYMTY (ORCPT ); Tue, 25 Jul 2023 08:19:24 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26D6CA3 for ; Tue, 25 Jul 2023 05:19:24 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0AFAA1F8D6; Tue, 25 Jul 2023 12:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690287562; 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=CzhSLRFCc3FDGVZMyotgaVDt7Mrd8qvEnkZ0YwdXPV0=; b=nKRhUzfPH3cLfWoj4+66Uk2UJmAoLfr8dKfDCDoTRwVGc55sq6oN4wZ0c8BdBabQ/Ou0cv w6EpBcoVXBXrxChM0EiPrRXaW0WBWBp1+axQ+kRwWmdC0MBGyEaeuGzJ8PGyIBis1UPZtL kejjAdVf8HKp40rMOA76rNcypP1TTzE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690287562; 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=CzhSLRFCc3FDGVZMyotgaVDt7Mrd8qvEnkZ0YwdXPV0=; b=h3xvJsUVFAXPSH7Xhlsu9+0t+dJV9ddIHtyQkWWmaR5f65LsHKyCPbSnW/JSjcRG5NpR36 mmgOYCUOmi1XezCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AE1CC13342; Tue, 25 Jul 2023 12:19:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id tf90Kcm9v2QxOwAAMHmgww (envelope-from ); Tue, 25 Jul 2023 12:19:21 +0000 Date: Tue, 25 Jul 2023 14:19:21 +0200 Message-ID: <87351ctc8m.wl-tiwai@suse.de> From: Takashi Iwai To: Pierre-Louis Bossart Cc: Maarten Lankhorst , =?ISO-8859-1?Q?P=E9ter?= Ujfalusi , alsa-devel@alsa-project.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Liam Girdwood , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Daniel Baluta Subject: Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding. In-Reply-To: References: <20230719164141.228073-1-maarten.lankhorst@linux.intel.com> <20230719164141.228073-3-maarten.lankhorst@linux.intel.com> <9b285ede-eaeb-40a2-086d-30cf74185784@linux.intel.com> <932c4293-375f-685c-2cfd-0bc80fd80683@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Jul 2023 13:52:32 +0200, Pierre-Louis Bossart wrote: > > > >>>> @@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev > >>>> *hdac_pci) > >>>>   { > >>>>       struct pci_dev *display_dev = NULL; > >>>>   +    if (!gpu_bind || (gpu_bind < 0 && > >>>> video_firmware_drivers_only())) > >>>> +        return false; > >> > >> > >> Bear with me since I am just going back to work mode but I can't figure > >> out what the second part of the test does > >> > >> bool video_firmware_drivers_only(void) > >> { > >>     return video_nomodeset; > >> } > >> EXPORT_SYMBOL(video_firmware_drivers_only); > >> > >> and video_nomodeset=1 by default, so why would we return false when > >> gpu_bind = -1? > >> > >> This seems to be a change of functionality, what am I missing? > > video_nomodeset is 0 by default, only when nomodeset is given as > > argument is it set to 1. :-) > > > I must be missing something on how the default is handled. > > bool video_firmware_drivers_only(void) > { > return video_nomodeset; > } > EXPORT_SYMBOL(video_firmware_drivers_only); > > static int __init disable_modeset(char *str) > { > video_nomodeset = true; > > isn't default 'true' then? disable_modeset() is called *only* when nomodeset boot option is given. Then it overrides the value to true. Takashi