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 1C83CC001DE for ; Tue, 25 Jul 2023 12:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233371AbjGYMSD (ORCPT ); Tue, 25 Jul 2023 08:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233337AbjGYMSA (ORCPT ); Tue, 25 Jul 2023 08:18:00 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36DB1A7 for ; Tue, 25 Jul 2023 05:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690287480; x=1721823480; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=+Ocevg64N0aIV9rG69RXaUubDlT2/mkhIyMR1Q1WkzY=; b=B1h8VPOsqYgnBTADgLdBS3eu0xQq5rjFsvgYjdQOttYVTwk7AjV48n9P Gb1+8Je0qzVCfFtBZb7aa0sOiKVqAchgSSS2l/+ApKjiz+yaLGIPHWjjd U634xFEJBBqBdvBiYDfjN+D/ffnglKbqvjI1kP4OBZgSP00bd8dFqvLMU Y67iLuAjmecKj/VKH1nt6VSF3Lm9P7CpqqdGi22SBFJ5m2e6zzzbNjb2x sulBzt+GKW2DIiqDiJgzO6Clrjjn+fzHygtRywahiFHe0GwZx6XOqAFYo 2SOKAGreQuPTHhAyshma83stan/ZfWovQpAAJ+nz0dEhq90nWPQbsC3s+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="352601903" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="352601903" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 05:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="791367909" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="791367909" Received: from mongola-mobl.ger.corp.intel.com (HELO [10.249.37.129]) ([10.249.37.129]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 05:17:56 -0700 Message-ID: Date: Tue, 25 Jul 2023 13:52:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Subject: Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding. Content-Language: en-US To: Maarten Lankhorst , =?UTF-8?Q?P=c3=a9ter_Ujfalusi?= , alsa-devel@alsa-project.org Cc: 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 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> From: Pierre-Louis Bossart In-Reply-To: <932c4293-375f-685c-2cfd-0bc80fd80683@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>> @@ -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?