Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2075861ybk; Mon, 11 May 2020 11:19:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKu3nzZ24vuZ4NDdmhMzNP/J6D/HBh804mZph6qMJE30AhetvvgN3rnwu2c2C6EODB+RWHB X-Received: by 2002:aa7:d1c6:: with SMTP id g6mr8580127edp.303.1589221177581; Mon, 11 May 2020 11:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589221177; cv=none; d=google.com; s=arc-20160816; b=JY3235AZvt/uDeSLsDwbRkUgSzhnUqGXBb26uGyUxktPqD+CiCKcXBBGLMxNNQKstw bom1BHujqZc3SVY0l5+X9Q5s5dxip2dL2mbO66bfUeu/994/doYKmUcm+kF9ji+BWoEf mKORfGTap84lBucV5QNf8j7N7Qq2GcFop4iyVKXosHZWZ+zoqK3tqXZY21xHhnegABpK 52hG6rUsgxgQDxKjNjDB+WmWfQ0pOMJ1Iezr44Nhop+dwChI4X6SnA+IEXNbJ3GlGJEz gCkTirwTJR8ACNcp1Ug7Xgb8srNowHUEBrNivKavc4dXimHL7qTT9nFJsuFlTBEED83g SNgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=jQWbulUERtT/Z6Gjd0x5twnJy6QuqCZSymS9LDL7lYQ=; b=l11HNqXpdBqTFmuLEiViLbU6Bahl5LVt3oMsdTSBPxyu4epBWopuhBL+GIjmaoKXR6 C90EDn/VyY4Ki02mKZcv8Bc5Zt124zItwGE1x6NgV4/5LNe2KwXTkJl8WXPpMRo5BFsM PxpQvUY+SiJbOYIfTsw7KPCpfh7r2fB/VYEeaTYYjpZao0km+MDfVkygl2NatBWuDlXf MeMuOi89PxE4gG/tiU72w1lWZTSyM6cA3DMcdXmeXSjXPoeWqLuIEl5YvKD9GNGMs8Em IXR1YO7HTgCJHbIx4o0KZtr+nPREQYyy5f08M9KT1VF2fE+7TvMAGq5T8Om1G0Yo6JqH wsKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si6352745edv.549.2020.05.11.11.19.13; Mon, 11 May 2020 11:19:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731073AbgEKSRf convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 May 2020 14:17:35 -0400 Received: from mga03.intel.com ([134.134.136.65]:53725 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729643AbgEKSRf (ORCPT ); Mon, 11 May 2020 14:17:35 -0400 IronPort-SDR: FCVbFbGT6W7Q29V7wEpA1jRYNeUZ5NC9xYJKLSh7XRKqgU6oZ0+6nagDE81qn4iWgRurF6bbeJ t8LVXxozKa9Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 11:17:34 -0700 IronPort-SDR: Y1DsXc4/UPTn8R3+5co8epPfgEtRYbtqfhLJy4DfqHLdQVkZtaZtEw2ypysEvY0wmqywkDhrIJ wyPNuQWdaOlg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,380,1583222400"; d="scan'208";a="286361037" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 11 May 2020 11:17:34 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 11:17:34 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.60]) by FMSMSX154.amr.corp.intel.com ([169.254.6.202]) with mapi id 14.03.0439.000; Mon, 11 May 2020 11:17:33 -0700 From: "Ruhl, Michael J" To: "Ruhl, Michael J" , Daniel Vetter , LKML CC: Intel Graphics Development , "DRI Development" , "linaro-mm-sig@lists.linaro.org" , "Vetter, Daniel" , "linux-media@vger.kernel.org" Subject: RE: [Intel-gfx] [PATCH 2/3] dma-fence: use default wait function for mock fences Thread-Topic: [Intel-gfx] [PATCH 2/3] dma-fence: use default wait function for mock fences Thread-Index: AQHWJ3Q9b7FvqdjeFkWZgt98eLHlv6ijMJewgAABOlA= Date: Mon, 11 May 2020 18:17:33 +0000 Message-ID: <14063C7AD467DE4B82DEDB5C278E8663010E20F87B@FMSMSX108.amr.corp.intel.com> References: <20200511091142.208787-1-daniel.vetter@ffwll.ch> <20200511091142.208787-2-daniel.vetter@ffwll.ch> <14063C7AD467DE4B82DEDB5C278E8663010E20F842@FMSMSX108.amr.corp.intel.com> In-Reply-To: <14063C7AD467DE4B82DEDB5C278E8663010E20F842@FMSMSX108.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: dri-devel On Behalf Of >Ruhl, Michael J >Sent: Monday, May 11, 2020 2:13 PM >To: Daniel Vetter ; LKML kernel@vger.kernel.org> >Cc: Intel Graphics Development ; DRI >Development ; linaro-mm- >sig@lists.linaro.org; Vetter, Daniel ; linux- >media@vger.kernel.org >Subject: RE: [Intel-gfx] [PATCH 2/3] dma-fence: use default wait function for >mock fences > >>-----Original Message----- >>From: Intel-gfx On Behalf Of >>Daniel Vetter >>Sent: Monday, May 11, 2020 5:12 AM >>To: LKML >>Cc: Daniel Vetter ; Intel Graphics Development >>; DRI Development >devel@lists.freedesktop.org>; linaro-mm-sig@lists.linaro.org; Vetter, Daniel >>; Sumit Semwal ; >linux- >>media@vger.kernel.org >>Subject: [Intel-gfx] [PATCH 2/3] dma-fence: use default wait function for >>mock fences >> >>No need to micro-optmize when we're waiting in a mocked object ... > >Makes sense to me. /sigh. Reading Chris comment, I am no longer sure it make sense... Un-ack? m >Acked-by: Michael J. Ruhl > >M > >>Signed-off-by: Daniel Vetter >>Cc: Sumit Semwal >>Cc: linux-media@vger.kernel.org >>Cc: linaro-mm-sig@lists.linaro.org >>--- >> drivers/dma-buf/st-dma-fence.c | 41 ---------------------------------- >> 1 file changed, 41 deletions(-) >> >>diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma- >>fence.c >>index e593064341c8..8166d2984702 100644 >>--- a/drivers/dma-buf/st-dma-fence.c >>+++ b/drivers/dma-buf/st-dma-fence.c >>@@ -33,50 +33,9 @@ static void mock_fence_release(struct dma_fence *f) >> kmem_cache_free(slab_fences, to_mock_fence(f)); >> } >> >>-struct wait_cb { >>- struct dma_fence_cb cb; >>- struct task_struct *task; >>-}; >>- >>-static void mock_wakeup(struct dma_fence *f, struct dma_fence_cb *cb) >>-{ >>- wake_up_process(container_of(cb, struct wait_cb, cb)->task); >>-} >>- >>-static long mock_wait(struct dma_fence *f, bool intr, long timeout) >>-{ >>- const int state = intr ? TASK_INTERRUPTIBLE : >>TASK_UNINTERRUPTIBLE; >>- struct wait_cb cb = { .task = current }; >>- >>- if (dma_fence_add_callback(f, &cb.cb, mock_wakeup)) >>- return timeout; >>- >>- while (timeout) { >>- set_current_state(state); >>- >>- if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &f->flags)) >>- break; >>- >>- if (signal_pending_state(state, current)) >>- break; >>- >>- timeout = schedule_timeout(timeout); >>- } >>- __set_current_state(TASK_RUNNING); >>- >>- if (!dma_fence_remove_callback(f, &cb.cb)) >>- return timeout; >>- >>- if (signal_pending_state(state, current)) >>- return -ERESTARTSYS; >>- >>- return -ETIME; >>-} >>- >> static const struct dma_fence_ops mock_ops = { >> .get_driver_name = mock_name, >> .get_timeline_name = mock_name, >>- .wait = mock_wait, >> .release = mock_fence_release, >> }; >> >>-- >>2.26.2 >> >>_______________________________________________ >>Intel-gfx mailing list >>Intel-gfx@lists.freedesktop.org >>https://lists.freedesktop.org/mailman/listinfo/intel-gfx >_______________________________________________ >dri-devel mailing list >dri-devel@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/dri-devel