Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3526464rwb; Tue, 20 Sep 2022 00:30:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4weOPRsxlGyePrV448P8HEMWyizx9Dy3tFlNKwV+DVcIjiMSygaPl/ew53jdhqOKyl/4s1 X-Received: by 2002:a17:907:7da3:b0:776:a0ae:5147 with SMTP id oz35-20020a1709077da300b00776a0ae5147mr15399505ejc.662.1663659021452; Tue, 20 Sep 2022 00:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663659021; cv=none; d=google.com; s=arc-20160816; b=PhKJ6QaLMED+i7Upsk9sNj/h5iWxIYIn0YQsIbCdSnoylNuoBDyz2O/TqIG8zaum1z KWSo3mlgakDFP2gJcWej/M9hCl4SWHndOxMZum01/lqYhpcrKFoqStZYgVr5QM4fDDDm Dhvt/zsiCjgrJB7mctJLFvBvAHL0bFMJV/YSKXjOhvjlUDGym+2Vbc8br7EkUB6an3pT iovHaBD7+ov/hqFpxkXGJcH7MoJoNEtu0wfIXnjvoNFQxY27vsb14vapQlpclExQwgRs f+Hrzxz2HKMD6CVHcM/KOz+kr9xnBxrdkluYOQlJRQ0fUQ+KzKTdiz6ApxJrzPq2wagA BYeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=karmccHd8NtKedn53R7u+UHA9aASOxOAueaxjzv1O8A=; b=HgNbL6b7L3aP6o51TXEl9aq/045YL2vX2pJWcnYaCbzUiPq9fEOekx1hvRvdeWOOOC 9UhbbIv3zzngyCIezfEFCqhbMiZZ0dklbhGrcyNcPViV2OqXI6CTkY8AJWdTZVe0ivg1 Ojp/8Iacncd6UDqmPmcKaxLaeZpCrCRlyQfj3nArOLZkyp04CYwGLZUQ4z7JTrha7DZx Bj6/yTgdZ+wdN163AG72ma7DOHKzfhkPg0O8a0vXzKGc9fzKjJ0iCaHDt0tC6W+8Vdqh uS1HWqN2M71lNLvG9BYUsJQSBJiBn0cGOwszzOa7vKTK9gIuoJ+xwwIWiI+fL53ZOfP5 whuQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a056402358100b004538b587ff6si984604edc.405.2022.09.20.00.29.56; Tue, 20 Sep 2022 00:30:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbiITGuz (ORCPT + 99 others); Tue, 20 Sep 2022 02:50:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231181AbiITGuk (ORCPT ); Tue, 20 Sep 2022 02:50:40 -0400 Received: from mailgw.kylinos.cn (unknown [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6455EDD6 for ; Mon, 19 Sep 2022 23:50:34 -0700 (PDT) X-UUID: 03b0ff0e0c094adf8616251c93b7712d-20220920 X-UUID: 03b0ff0e0c094adf8616251c93b7712d-20220920 X-User: zhouzongmin@kylinos.cn Received: from localhost.localdomain [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 985915299; Tue, 20 Sep 2022 14:51:11 +0800 From: Zongmin Zhou To: airlied@redhat.com, kraxel@redhat.com, airlied@linux.ie, daniel@ffwll.ch Cc: virtualization@lists.linux-foundation.org, spice-devel@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Zongmin Zhou , Ming Xie Subject: [RESEND PATCH] drm/qxl: drop set_prod_notify parameter from qxl_ring_create Date: Tue, 20 Sep 2022 14:50:23 +0800 Message-Id: <20220920065023.1633303-1-zhouzongmin@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, MAY_BE_FORGED,RDNS_DYNAMIC,SPF_HELO_NONE,T_SPF_PERMERROR, UNPARSEABLE_RELAY autolearn=no 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 Since qxl_io_reset(qdev) will be called immediately after qxl_ring_create() been called, and parameter like notify_on_prod will be set to default value. So the call to qxl_ring_init_hdr() before becomes meaningless. Signed-off-by: Zongmin Zhou Suggested-by: Ming Xie --- drivers/gpu/drm/qxl/qxl_cmd.c | 8 -------- drivers/gpu/drm/qxl/qxl_drv.h | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 4 +--- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 7b00c955cd82..63aa96a69752 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -53,17 +53,11 @@ void qxl_ring_free(struct qxl_ring *ring) kfree(ring); } -void qxl_ring_init_hdr(struct qxl_ring *ring) -{ - ring->ring->header.notify_on_prod = ring->n_elements; -} - struct qxl_ring * qxl_ring_create(struct qxl_ring_header *header, int element_size, int n_elements, int prod_notify, - bool set_prod_notify, wait_queue_head_t *push_event) { struct qxl_ring *ring; @@ -77,8 +71,6 @@ qxl_ring_create(struct qxl_ring_header *header, ring->n_elements = n_elements; ring->prod_notify = prod_notify; ring->push_event = push_event; - if (set_prod_notify) - qxl_ring_init_hdr(ring); spin_lock_init(&ring->lock); return ring; } diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 47c169673088..432758ad39a3 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -277,10 +277,8 @@ struct qxl_ring *qxl_ring_create(struct qxl_ring_header *header, int element_size, int n_elements, int prod_notify, - bool set_prod_notify, wait_queue_head_t *push_event); void qxl_ring_free(struct qxl_ring *ring); -void qxl_ring_init_hdr(struct qxl_ring *ring); int qxl_check_idle(struct qxl_ring *ring); static inline uint64_t diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 9bf6d4cc98d4..dc3828db1991 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -194,7 +194,6 @@ int qxl_device_init(struct qxl_device *qdev, sizeof(struct qxl_command), QXL_COMMAND_RING_SIZE, qdev->io_base + QXL_IO_NOTIFY_CMD, - false, &qdev->display_event); if (!qdev->command_ring) { DRM_ERROR("Unable to create command ring\n"); @@ -207,7 +206,6 @@ int qxl_device_init(struct qxl_device *qdev, sizeof(struct qxl_command), QXL_CURSOR_RING_SIZE, qdev->io_base + QXL_IO_NOTIFY_CURSOR, - false, &qdev->cursor_event); if (!qdev->cursor_ring) { @@ -219,7 +217,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->release_ring = qxl_ring_create( &(qdev->ram_header->release_ring_hdr), sizeof(uint64_t), - QXL_RELEASE_RING_SIZE, 0, true, + QXL_RELEASE_RING_SIZE, 0, NULL); if (!qdev->release_ring) { -- 2.25.1 No virus found Checked by Hillstone Network AntiVirus