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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31323EB64D7 for ; Fri, 23 Jun 2023 18:02:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AFD810E694; Fri, 23 Jun 2023 18:02:13 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0073010E6A3; Fri, 23 Jun 2023 18:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687543331; x=1719079331; h=message-id:date:subject:to:references:from:in-reply-to: mime-version; bh=au9JUA3Rfi6snC5by4lqeQQ9NOZYz2zGs463ZHmNX8s=; b=fWyA3dUmhqEqzZMH7XOnWv7SKHZNe2PLz3ESbmVWuodHmm75iY0icSGC DkI7v83yvqEG32gCs1xIkU5IY9rbTgINv0QY/NwFM3F3wN7m+PUIykGuP 8nXIqHIhKuPoP12AdEgUeKvJUMbRPCWFt8gDwEAlB0Y59vFGXZNwfnT53 mTnZpyBUjCukgQdBBoIkpNIPEM6GFyXevGDqMcqnpZQCAQc/oK83IIkcO GNChflCoDHVxbOHvCzlGXnhFsefzRvBLibU/+Aa1PJHNEUrY7PDWqtNGM DNcvM+ZEJNCVynZAPycblwf4+d7mfc1r85h3e70i+GFE8ODmIYifHKn4+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10750"; a="350595048" X-IronPort-AV: E=Sophos;i="6.01,152,1684825200"; d="scan'208,217";a="350595048" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2023 11:02:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10750"; a="839536092" X-IronPort-AV: E=Sophos;i="6.01,152,1684825200"; d="scan'208,217";a="839536092" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga004.jf.intel.com with ESMTP; 23 Jun 2023 11:02:09 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 23 Jun 2023 11:02:08 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Fri, 23 Jun 2023 11:02:08 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Fri, 23 Jun 2023 11:02:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=II8v25+Gpy0APfUBlVxy7LVP8e9xYhXCsotfJu33ljdDwhuVpZ78gm1BBZVpvG0T6G6h5gFsTZLDOKx+ViqAFgu4Nk87lrxA5/3ynIOPsF3jd5aGyVBbjjvxbM5fWYtWahq5EF4pdoGbzlPr1qxjTZzQ8VND/h1lVaUItA4rBqYl2P3X6XKdSR64UXZXN114B9ZObiDZ0VYnSgxZulIunQVyhg/Zo5hnJlX6voihXbqtLqcugVfFYYmDT7bjqwPPNSvg7LweHc0ixFATlht45AeOcqCOJimQxVYQ64ZPps4I+3dqh3dL9hn3wJq5akd7oflcto6n5XTwalEo5jSihw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K7tpwZTMTHeUjag8FIU1hFXIHGzpz7Htyiwcn2UvHZg=; b=AO3neksEL29mk7Rq2RQxzBn7Zumv752tSJz2WlmbfwUHCxRn6wjk7Piy3TIH3kLPQTl3bTyfzb8JJ6xjJCdImnSLFcRnDKQ2RH03utUng2WQcgNu3fHNc+Mwif7+yNu0K+OsdOECBzNkNZtJDCakNTgD+mKG7iXhlErc/u3fk0XQItUptX7s8mAlDuh8RvOK+9uTHtG2IyN6574vQzimx+FcewPOT8c3/dV1nTilWpGOd1q/nGAbTQhGdTvk9/WJzOrnokWVNkLcLO8NITC/4y2spCqvdHpK+5Q4U6CFEWcfc6OEfVCa3nCfiR0iTVuAwHMvNkykj5a3Kkps6IXK6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SN6PR11MB2622.namprd11.prod.outlook.com (2603:10b6:805:57::31) by CYYPR11MB8385.namprd11.prod.outlook.com (2603:10b6:930:c1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Fri, 23 Jun 2023 18:02:06 +0000 Received: from SN6PR11MB2622.namprd11.prod.outlook.com ([fe80::91eb:a6da:c4ea:2571]) by SN6PR11MB2622.namprd11.prod.outlook.com ([fe80::91eb:a6da:c4ea:2571%4]) with mapi id 15.20.6521.024; Fri, 23 Jun 2023 18:02:06 +0000 Content-Type: multipart/alternative; boundary="------------hzFsmLeRenc6ioPz5Y6EJ4G3" Message-ID: <0ef48abf-a0d6-7ec6-82ac-afd7d83947cc@intel.com> Date: Fri, 23 Jun 2023 14:02:01 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.12.0 To: "Yang, Fei" , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" References: <20230622152644.169400-1-zhanjun.dong@intel.com> Content-Language: en-US From: "Dong, Zhanjun" In-Reply-To: X-ClientProxiedBy: MW4PR04CA0289.namprd04.prod.outlook.com (2603:10b6:303:89::24) To SN6PR11MB2622.namprd11.prod.outlook.com (2603:10b6:805:57::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR11MB2622:EE_|CYYPR11MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: d2271d26-f1a1-4e2f-e24f-08db7413f468 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XfjtM/AFV5DON1OFKEbcPou8/9pyfE+htkkXAhnaDaC0RQA4+r+iedcaD5nwZJADvkKMOFgqbtHg+hb0oR+jFl2seIWAYaSUIVvoLeiqDB8IYu+Quqr+vpPlFvMGl4U5EafTxPD05M7jglI3HbpOF1zQTgqdK4Mq7oYXVD2yBpMwRdrujvjldaw3LG9VBB0L8pg9OmARK/G++fMfzaXW8fbrO7kYXCejiBsIBdMd0LunGDR90sqJsgTHeyMmNV85eD9RF44znQEav6j6l7cjfjC+/Y2iyeXwgTMRumvLbTIf+aFrwgggckySY8mHmpEQTJ9FMMGRgvyAO7UqiAyTWT1Xzzpu2/Dxab/NeHBa8lHvTmbRWrls+e6YVrYcn8ME7unbZB0xZmmUhkHiZVAQMoioOK9QgYdow1FjN4ETq1F6IasBMyL2UNAcgIMCChdIw8MPj41ffW+8UYQ7NNa6r5mtAwisiCve6t/9bYkTvAIOwZrJwcSkgAGo1+2P3oq83lJuxPi9JlQ9MPSHj8re75SpISSNCt6ppaKAd47RsN/4OB5B6tjFbGakbaY42vE+u0G2oF6HYon2obVP55pDsXkoxfuJtkMiUw757Uxc3S09eXs+uA3ZVliehT8R+BSEO3rQmy5InCImV/8CwzYjGA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2622.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(136003)(396003)(346002)(366004)(376002)(451199021)(6486002)(33964004)(478600001)(450100002)(6666004)(110136005)(31696002)(6506007)(186003)(66946007)(2906002)(316002)(8936002)(41300700001)(5660300002)(82960400001)(86362001)(66476007)(66556008)(53546011)(38100700002)(8676002)(26005)(6512007)(36756003)(2616005)(83380400001)(19627405001)(31686004)(43740500002)(45980500001)(579004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bFFJOFNNTFllWjljL2pLaEF0ZkxDMXk3L1BxckVxS05weXlkdFFyWHdqZmpm?= =?utf-8?B?Q05DNlNnakN2bHBYemUxWmZTbFh4M0hqQ3RwWU5HSitFV2p2WUxlbGZkVlh0?= =?utf-8?B?UlZXNzUxQWlpQ0tSaG8wYStYOGgwcUtlRmhSTjlrWW5oZDR3RENXZ0NRY2ha?= =?utf-8?B?aVBiSkxLZzc2RktlN2xrNkp2YmNTK2RJaTNHeGo2bWZRdk80NGl1MzEzZGVW?= =?utf-8?B?SWlLQjhzcnJGRTRVOW5DZGtOVk1hQWJ3VUNQMTRJOWJoRnNSemZPendNZ25x?= =?utf-8?B?NXViWU1rZVJ0dWpYb0RtK3UwNXZiT1RnVFM5ZEZjTlA3QzdBN3FRSG5IS2FM?= =?utf-8?B?RlZ6ancvZXE5Um56VXY3Kz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24f-08db7413f468 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2023 18:02:06.0108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GqhbIkeNYKI12PNiRgtxyq8zddpz+Jhs/fex/SEd3akdFsDXTDK3vEgWyMjPOVwe9/ZAPwK8y6JlOfI+wYaYEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR11MB8385 X-OriginatorOrg: intel.com Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Remove incorrect hard coded cache coherrency setting X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --------------hzFsmLeRenc6ioPz5Y6EJ4G3 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Hi Fei, Thanks for review. I put my answers inline below. Regards, Zhanjun On 2023-06-22 6:20 p.m., Yang, Fei wrote: > > The previouse i915_gem_object_create_internal already set it with > proper > > value before function return. This hard coded setting is incorrect for > > platforms like MTL, thus need to be removed. > > > > Signed-off-by: Zhanjun Dong > > --- > >  drivers/gpu/drm/i915/gt/intel_timeline.c | 2 -- > >  1 file changed, 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c > b/drivers/gpu/drm/i915/gt/intel_timeline.c > > index b9640212d659..693d18e14b00 100644 > > --- a/drivers/gpu/drm/i915/gt/intel_timeline.c > > +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c > > @@ -26,8 +26,6 @@ static struct i915_vma *hwsp_alloc(struct intel_gt > *gt) > >          if (IS_ERR(obj)) > >                  return ERR_CAST(obj); > > > > - i915_gem_object_set_cache_coherency(obj, I915_CACHE_LLC); > > - > > Does this change really fix the coherency issue? Testing in progress. Issue reported by E2E team, now is their public holiday. Meanwhile, I have trouble to run the test case on my setup. Need to sync with them later. > I consulted with Chris and he said that the hwsp is purposely set to be > cacheable. The mapping on CPU side also indicates it's cacheable, For single end access area that setting works well. Here the problem is the head/tail memory area requires different cache setting. As  the previous i915_gem_object_create_internal already set the cache setting for current platform properly, why we overwrite it here? > > intel_timeline_pin_map(struct intel_timeline *timeline) >         { >                 struct drm_i915_gem_object *obj = > timeline->hwsp_ggtt->obj; >                 u32 ofs = offset_in_page(timeline->hwsp_offset); >                 void *vaddr; > >                 vaddr = i915_gem_object_pin_map(obj, I915_MAP_WB); >                 ... >         } Maybe we should also set it to match platform as well? > > >          vma = i915_vma_instance(obj, >->ggtt->vm, NULL); > >          if (IS_ERR(vma)) > >  i915_gem_object_put(obj); > > -- > > 2.34.1 > --------------hzFsmLeRenc6ioPz5Y6EJ4G3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit

Hi Fei,

 

Thanks for review. I put my answers inline below.

 

Regards,

Zhanjun

On 2023-06-22 6:20 p.m., Yang, Fei wrote:
> The previouse i915_gem_object_create_internal already set it with proper
> value before function return. This hard coded setting is incorrect for
> platforms like MTL, thus need to be removed.
>
> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_timeline.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
> index b9640212d659..693d18e14b00 100644
> --- a/drivers/gpu/drm/i915/gt/intel_timeline.c
> +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
> @@ -26,8 +26,6 @@ static struct i915_vma *hwsp_alloc(struct intel_gt *gt)
>          if (IS_ERR(obj))
>                  return ERR_CAST(obj);
>
> -       i915_gem_object_set_cache_coherency(obj, I915_CACHE_LLC);
> -

Does this change really fix the coherency issue?

Testing in progress. Issue reported by E2E team, now is their public holiday. Meanwhile, I have trouble to run the test case on my setup. Need to sync with them later.


I consulted with Chris and he said that the hwsp is purposely set to be
cacheable. The mapping on CPU side also indicates it's cacheable,

For single end access area that setting works well. Here the problem is the head/tail memory area requires different cache setting.

As  the previous i915_gem_object_create_internal already set the cache setting for current platform properly, why we overwrite it here?



        intel_timeline_pin_map(struct intel_timeline *timeline)
        {
                struct drm_i915_gem_object *obj = timeline->hwsp_ggtt->obj;
                u32 ofs = offset_in_page(timeline->hwsp_offset);
                void *vaddr;

                vaddr = i915_gem_object_pin_map(obj, I915_MAP_WB);
                ...
        }
Maybe we should also set it to match platform as well?

>          vma = i915_vma_instance(obj, &gt->ggtt->vm, NULL);
>          if (IS_ERR(vma))
>                  i915_gem_object_put(obj);
> --
> 2.34.1

--------------hzFsmLeRenc6ioPz5Y6EJ4G3--