Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5423590rwn; Mon, 12 Sep 2022 08:50:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6TEoZ7IpZvLb1BDj6rjl3Vz2U1RV8VkAqCx3keYD5HrRPNDcB0VE5MdYQx7RiA64ul9SIV X-Received: by 2002:a63:fc14:0:b0:430:d1d0:fe33 with SMTP id j20-20020a63fc14000000b00430d1d0fe33mr23915094pgi.328.1662997836559; Mon, 12 Sep 2022 08:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662997836; cv=none; d=google.com; s=arc-20160816; b=QHeoBUz5xuTaTzZ3/74VNwU3YEZZsa1nDS5uJTcsBtb1B1e6ab7ZcVUaBmjfAdD+rz Js6M6WU5reAlKPfP+hQ0RAEXYtFDIQBhuetK+euKUJxMicn7WKmjy+OhbMst7x6vkjRO 0fNHdGrW8/sKQdEdCTmzJMWuZsinavuikLuWoE5tNfPp3HnXJv6RVpp0QMm99Nr0Wp2W y8iullRC0tqBsNvxbwSNlWqIvNnURiKtght4Vh+mtcS+xcAwFNGB7sMjwA4X1/QdOipJ uB5J/O8D/RkuqlPTxNdvzkEuL9N0IV6lQiFZF7lw8ESK/rkn1t8FE1qal/wDli8FKZ7z V+Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter; bh=24KADFj4btF3I+/3El4CjQCGgseN2zkrF5osGbvl+xE=; b=w9Qmz77XPKpaj9xt2RZsJClb2SVbSOy+/4+bjHEjIeENVxBa8pmYcjFGIewYNODfoc nQ8OowiqbpUP3xnsmN9SFE444/3D/sMZJFuFHp2q9zrLMnrdISSU7fTp2dbTcdEcI/iD vNLj8f3JHvqAgDSBwWERMAypMYsjPgMR9TLaOqQNiaYPzgFbIJVijc8iBXXBL0eD4Qnf V0h7tiCohSiXFK602OnF7S+QiAOmi0UoYw1g8tGnkxbELmMwuAwo/J4GZAoMvszWUXGu ogUqacYA9Hb+3jtOD56yYF0P3D//YDhg7XwqWL30/v2T3ybm9L8e9ZU+fxyBZVgZzu9D Wy4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="j9D/dSfi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a170902ecce00b0017298291826si3400792plh.459.2022.09.12.08.50.22; Mon, 12 Sep 2022 08:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="j9D/dSfi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbiILPcy (ORCPT + 99 others); Mon, 12 Sep 2022 11:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiILPcv (ORCPT ); Mon, 12 Sep 2022 11:32:51 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 183A726572; Mon, 12 Sep 2022 08:32:51 -0700 (PDT) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id C0B6B204778A; Mon, 12 Sep 2022 08:32:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C0B6B204778A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1662996770; bh=24KADFj4btF3I+/3El4CjQCGgseN2zkrF5osGbvl+xE=; h=From:To:Subject:Date:From; b=j9D/dSfidQMifQCZLsMtHDo19KCgzJdaiREUzzmOzl66gK2quNutiCpl+4gkezUJQ eB2xYy9dfWKa4n6cS1WeSdC/soiOpA6Etdp8weEkfulOQy58CICPM3FleUgoxoszB9 EPHjJlzAXk1jAz9DCBj4dJxqThntGvyQV3DAjKO8= From: Saurabh Sengar To: ssengar@microsoft.com, drawat.floss@gmail.com, airlied@linux.ie, daniel@ffwll.ch, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, mikelley@microsoft.com Subject: [PATCH] drm/hyperv: Don't overwrite dirt_needed value set by host Date: Mon, 12 Sep 2022 08:32:46 -0700 Message-Id: <1662996766-19304-1-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Existing code is causing a race condition where dirt_needed value is already set by the host and gets overwritten with default value. Remove this default setting of dirt_needed, to avoid overwriting the value received in the channel callback set by vmbus_open. Removing this setting also means the default value for dirt_needed is changed to false as it's allocated by kzalloc which is similar to legacy hyperv_fb driver. Signed-off-by: Saurabh Sengar --- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c index 4a8941fa0815..57d49a08b37f 100644 --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c @@ -198,8 +198,6 @@ static int hyperv_vmbus_probe(struct hv_device *hdev, if (ret) drm_warn(dev, "Failed to update vram location.\n"); - hv->dirt_needed = true; - ret = hyperv_mode_config_init(hv); if (ret) goto err_vmbus_close; -- 2.31.1