Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1297137rdb; Sat, 3 Feb 2024 00:11:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IH80mQwVrA74brAK4tutjJP/AhYOc54oKQFGxc23tSO3zJc1P4fAoFfJU5GcUu++u85O2j9 X-Received: by 2002:a05:6a00:2352:b0:6df:bb25:ee25 with SMTP id j18-20020a056a00235200b006dfbb25ee25mr9407174pfj.18.1706947875457; Sat, 03 Feb 2024 00:11:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706947875; cv=pass; d=google.com; s=arc-20160816; b=IJyi0lDoUokzGcsZCCKE9hThPtfuWghXoMg1t/361VBJ36rklsCEWLNLVY3D5M8noU aEOvq69cE3F7KeWqZTuh2kMOJOM6Bp3KMJOFvOmbSTYj6Hgq949AXL9YaOCpLOTf8D7o uP8jhs2jmy3X5SOEz4NEDTKPf/kncNy734m4fAvhTxDsYlM/MszyPA0SEnCbCTfCK6yh N5eBkGyc7TGhv1N6Xb+ScFBm7QDUBKh2wid1Ztl5NNS+yomU8iFP9ljE9F1c2VGjBFSJ 9/tutClGry/7szm2wujxoxMxc99NG5hD6dNlaXhIMV7X/uvbYg+tkhGoqtl13calRmt4 G/eA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature:dkim-filter; bh=07vG+62V6dqAkeDJQ2J+ZqfY5Na7tXr+v+0St/Ckcu8=; fh=QKnYdPfC4iWZ8WIS4LzqSj1Azd4SEBqa4TxAE8sNgtM=; b=I964pShw7k0mpXs4ZVGwjVLFPBc4XDUIPmpnXoJ0Eu0Njwik0GuBzxh2vRqWDu8Zqa gGCe3YiAoVFQfBHk2+xzOQnm6APpGa2qEMhXoHLFPqtz27h//B1YNKWc4CFp7mm0WKLq EBDyKewxgYk5hnJXnDSEDhH7R8znNAxn9b5+LRRpo2Pq7gWUqGQfLu6S5gtw80/UESX4 Hm8wHGAn3epUsWvjiiUOUAOK+wRX5elOlxTut2YRNWvr3SDHt34e8cofNYT8OU5duKau fDx1e5uvZKFJwG0qNi+mCf/6IGb+WEFn+9Q6JwBtiJNp7qBrI3dAyeXTrQScuIT6LCT5 WUJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=k0OfUKLR; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-50972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com X-Forwarded-Encrypted: i=1; AJvYcCUGelfkJRpvdit4GylVzVXoUyA4Nk8abvMvF7fxT43STnDcL7j9af+ENMRHkTqFeGvcact1PwIj7auh6cLo7Wh+kCQZI4yJZEas3MkSxw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n16-20020a634d50000000b005d6d6f8cbddsi2872866pgl.360.2024.02.03.00.11.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 00:11:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=k0OfUKLR; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-50972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.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 AF91A28682A for ; Sat, 3 Feb 2024 08:08:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D35384F205; Sat, 3 Feb 2024 08:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="k0OfUKLR" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C30F4EB25; Sat, 3 Feb 2024 08:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706947732; cv=none; b=tgvzkD806y3DRlo47+c6IxjOTYPjbcmvTc618rQVSxyfs1p7AgEaIjb8qg2vhDKJ5ye/RfHNuNFZorwD6eYhl+h1BbqxxYnxru7N185pKjAd/N3o+y9PqcOzUoCT9H1wWSOG96yxHluPaTpBbPzeDNl+hXANCKSeaAgS9e0cFFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706947732; c=relaxed/simple; bh=XGVfjG+sAX4pMvyR7XEzs8ZfGkMlTIaJ8Nl+H+MNGAo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ctpWMBoLkD72BDzsX32EDuRh3WMlkHZFS05lokdA4wklPvQ/aDHsFaJxelcJeW9OYk2N+3MT0WkhXdQq7VUrDuWh4oyAEpbgoeg0SSUJIohJbo5X1OL7yo57PiZ59mZw9rvVgr8yhby1wZjmTfxMPRRI8HS/aSYwjEaLFk5jP5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=k0OfUKLR; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1127) id 1FEF220B2000; Sat, 3 Feb 2024 00:08:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1FEF220B2000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706947730; bh=07vG+62V6dqAkeDJQ2J+ZqfY5Na7tXr+v+0St/Ckcu8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k0OfUKLRSHYVPhHV1EpWNPpWC6i1WTJcXBa2tZvc8JfqeyLHc9hXmmyjLL/7PFfog jZJk6fA7GbUoUCKRkLzRxY4HXST8rtvY0yxHbkTq8Mp07BNna9WUOBpKl9iTna8PjU D71g3xP55ydTQQjUHFGqhRYznWbhCF8MUzZA39ac= Date: Sat, 3 Feb 2024 00:08:50 -0800 From: Saurabh Singh Sengar To: mhklinux@outlook.com Cc: haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, drawat.floss@gmail.com, javierm@redhat.com, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com, tzimmermann@suse.de, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH 1/1] fbdev/hyperv_fb: Fix logic error for Gen2 VMs in hvfb_getmem() Message-ID: <20240203080850.GA29113@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240201060022.233666-1-mhklinux@outlook.com> 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: <20240201060022.233666-1-mhklinux@outlook.com> User-Agent: Mutt/1.5.21 (2010-09-15) On Wed, Jan 31, 2024 at 10:00:22PM -0800, mhkelley58@gmail.com wrote: > From: Michael Kelley > > A recent commit removing the use of screen_info introduced a logic > error. The error causes hvfb_getmem() to always return -ENOMEM > for Generation 2 VMs. As a result, the Hyper-V frame buffer > device fails to initialize. The error was introduced by removing > an "else if" clause, leaving Gen2 VMs to always take the -ENOMEM > error path. > > Fix the problem by removing the error path "else" clause. Gen 2 > VMs now always proceed through the MMIO memory allocation code, > but with "base" and "size" defaulting to 0. > > Fixes: 0aa0838c84da ("fbdev/hyperv_fb: Remove firmware framebuffers with aperture helpers") > Signed-off-by: Michael Kelley > --- > drivers/video/fbdev/hyperv_fb.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c > index c26ee6fd73c9..8fdccf033b2d 100644 > --- a/drivers/video/fbdev/hyperv_fb.c > +++ b/drivers/video/fbdev/hyperv_fb.c > @@ -1010,8 +1010,6 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) > goto getmem_done; > } > pr_info("Unable to allocate enough contiguous physical memory on Gen 1 VM. Using MMIO instead.\n"); > - } else { > - goto err1; > } > > /* > -- > 2.25.1 > Reviewed-by: Saurabh Sengar