Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3186727rdb; Wed, 13 Sep 2023 05:03:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfE/gslkly0I8kNCysR5o5c90ctrJtezzQiJFa7/N4E8k9Jd0MLn6cZavzvbrebEurmWwK X-Received: by 2002:a05:6358:5290:b0:139:d277:354d with SMTP id g16-20020a056358529000b00139d277354dmr3236375rwa.22.1694606626342; Wed, 13 Sep 2023 05:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694606626; cv=none; d=google.com; s=arc-20160816; b=vIrJ8qLcsspUHUyC2BPyxlQMazCzXS9K+H0Sn2gO5J4krm5dEVREkI7+P0/LwhpVlP yLjravAm12QFyHqwtu4zKSvl0lfT7J9M43tMrQ4nMCsjwzELkEAE7/fN6yJ82IDSLkDr SzK9CCbu653Pdu4LFBReo8j7749TiduSZRgRI6vyNrgyq1ZdPEKv+nP6GR/qahUdZ9sa NLafxAmRNPZi6rkPfkawlKzQCtEPH+tmktseCWBGoaX3c53IYpHW/EpJGg1WMEey3SQW ZCtPmW596LkO9/9waJfkchsYdofA6xgYHy7LFDj62GsGFXtUDw/749iDhHRr6Vy7n1ua LYIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eVi9HWsbyhPpxRlpwWkXgfmiV8lk8qQbW6adbUERlyM=; fh=ji8mUhiuAXlsL6zlHQQUAnOULVT1AhtcILdQUuhMslQ=; b=nc8I4ne86+xagIuRJnwwYAGUKExuE5YW4i+UDhxC3TGpK311yNna0JYKwi2hmxUmU5 NW9hYLy/2ul8HwvxqK4zzUwFzVvIfRcUgq7Hc9/ajptLiJv32INWtiGDOVTEz3re+cP+ Wz1z4RG/eR/mdLOs36so0xNpdChsr9+XOtIrbcfsYqED/4tKofrKpl/DyMgzzcpuOBOQ YHRzeClvc+J2rM/rZUcJzNFFhcJXip1ByBlCHUwd/b3UWAtLMyyhCFLm2wFadruiJ3uL 5inqSuAaypgVyoUY88L3WsIT94xGcb4hlOFyYYhs7G4PFEeXIlChp9+4btnq1P0hW/A4 18+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WtqJJ8zd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id n31-20020a63591f000000b00573f9d916fbsi9967440pgb.784.2023.09.13.05.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 05:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WtqJJ8zd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 366DB8034669; Wed, 13 Sep 2023 01:02:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238696AbjIMICz (ORCPT + 99 others); Wed, 13 Sep 2023 04:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238699AbjIMICx (ORCPT ); Wed, 13 Sep 2023 04:02:53 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7CBD198C for ; Wed, 13 Sep 2023 01:02:49 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-7a855441a36so604410241.0 for ; Wed, 13 Sep 2023 01:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1694592168; x=1695196968; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eVi9HWsbyhPpxRlpwWkXgfmiV8lk8qQbW6adbUERlyM=; b=WtqJJ8zdF2DvevVlZUhifJqIjvzG6d52EXJ/FGWxwKb04dsvN5ilpFnQXqaon0qMZ5 7Egy9zqeMIilpPtvctkBSU5dgbTyt6mMFVRybsrt8hv8RnSx7mNzQtgnjs/YWV0kDZF5 UwvQBudXGR+np6IbljBax6FU+eL6TJXZ8eKpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694592168; x=1695196968; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eVi9HWsbyhPpxRlpwWkXgfmiV8lk8qQbW6adbUERlyM=; b=LpEMt5C3S8j/KPVQVuswdo7Ux30vza5qpxBQ6uiDstycs+SczsGbAmBThCv/THMCMf SfF15OUAyYVMzTNzYZxtAxHNdeQX8jqeC1A+tfO6qyA+0oj3jnWza/D31SfvpQ1elKxU +RKo1tfQ53ehweWjMVCGy5tqr1BdTfvnfpzyEDVBCUmOlO6a477SjxmJOwdehzACkGpv Df998lbshF1Mv3jzSbr4m1FMb9jNYP1K6B+IvusmRQoSkpoM1hhlHMsBkGpRSbFZZ4uk CJ0ZrFhEqDI7eS+CKjiQVOVgbOMXiDP06SCC0oj3kB6tKlYQ2JUVm3a9+/M3G02kUL/3 Y6WA== X-Gm-Message-State: AOJu0YyEaO/PqDC+G+8OJUJzquWGZTfpzMsCwQSKp0gvnCYFcvQxzhm7 UwDGs9DXfGRl9/xU+yRNg3KH+JBRo9uKJKL85P4= X-Received: by 2002:a67:fd54:0:b0:44e:a216:59a2 with SMTP id g20-20020a67fd54000000b0044ea21659a2mr1458457vsr.7.1694592168655; Wed, 13 Sep 2023 01:02:48 -0700 (PDT) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com. [209.85.128.177]) by smtp.gmail.com with ESMTPSA id x188-20020a0deec5000000b00582b239674esm2970889ywe.129.2023.09.13.01.02.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 01:02:48 -0700 (PDT) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-59b8f5b6c0aso28451327b3.0 for ; Wed, 13 Sep 2023 01:02:48 -0700 (PDT) X-Received: by 2002:a05:6602:3281:b0:786:7100:72de with SMTP id d1-20020a056602328100b00786710072demr2263328ioz.16.1694591694827; Wed, 13 Sep 2023 00:54:54 -0700 (PDT) MIME-Version: 1.0 References: <20230822132646.9811-1-jason-jh.lin@mediatek.com> In-Reply-To: From: Fei Shao Date: Wed, 13 Sep 2023 15:54:18 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin To: "Jason-JH.Lin" Cc: Chun-Kuang Hu , AngeloGioacchino Del Regno , Alexandre Mergnat , Eugen Hristev , Jason-ch Chen , Johnson Wang , Singo Chang , Nancy Lin , Shawn Sung , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Project_Global_Chrome_Upstream_Group@mediatek.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Sep 2023 01:02:57 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On Thu, Aug 31, 2023 at 3:12=E2=80=AFPM Fei Shao wrote= : > > On Tue, Aug 22, 2023 at 10:27=E2=80=AFPM Jason-JH.Lin wrote: > > > > Add spinlock protection to avoid race condition on vblank event > > between mtk_drm_crtc_atomic_begin() and mtk_drm_finish_page_flip(). > > > > Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8= 173.") > > Signed-off-by: Jason-JH.Lin > > Reviewed-by: Fei Shao Also, I verified that this fixes a real world system hang issue on the MT8195 Chromebook. Tested-by: Fei Shao