Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp930580ybi; Fri, 31 May 2019 10:57:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMyL+w72Pxvrq2KYaY6kxSsH4G6nh69o7Vol1gDSmX5gMMwktDy7DGynkQckFZR6UugZGB X-Received: by 2002:a63:2486:: with SMTP id k128mr8085814pgk.125.1559325451267; Fri, 31 May 2019 10:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559325451; cv=none; d=google.com; s=arc-20160816; b=Lssd+LqA8x+ODG4U7x1Bs/3D5is+PUXmRmRw0sSyk6ubm7HC8aeJ6IV1msG3zrEHoC C2ecvNUcHWk5zMPVWCtxmbu1fsQ8I2XT0KmukKJ4FgSKdZ/2xZlM5Z+/MhZjZs4Ie+Y9 5TI2m9Hsfjq2r5VL8ZBNdLOiiGWNVLUg4xgV/Ciq1GVo7PVF/Rc8VsFBZsw5/7CkUJ/1 N0rEK9o5059rXjLHMPT7mTgx2Lr22P16K7TLu/Dg8dOxQqAeZNmwdisvwHcVVHYRClaY tx9jmhVJuPvNVGG2W56LHOzmW3oyxLboeSPdcQb4trMcDcRTKO0dtmRDMAqvfgQ3g8XC nlQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=Hy/bcA8XBZvnwwAh1TXp+fqxW5RiwbsUNxb0qwOXyik=; b=m/Z2jt5kqP4uuyqrb5vtC3am2kmWKlEPuicUPyUOW5vrQQ6LOnhGEixQUhcKnoGZ2Z rwiIXkpdV2z2CsbGgdKoPDNUOQ7pstlZiyGoZ7j10pnM02Q8o6sybzEuOMccVOeTzWNT 3TvEpAncRvfgWfpuCdZ8Ynlq1aADLMTxKux0umcveWxPPiLsHXfDtRPgyCInLZYaarFs 0PfJnKhPcyXPRTcXWiwcQPpe1c46rPpubYpa/HXqf0dR4kGaewnsDScWY/KF9Qfj3M4/ 1rSezP3vXJRMakViZPIRYku2rTFCMeHuIwHYkuxv7BFV/klpgP66RrE/tQA9wbB3HFx4 Kz6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si6930344pjl.60.2019.05.31.10.57.15; Fri, 31 May 2019 10:57:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfEaRy7 (ORCPT + 99 others); Fri, 31 May 2019 13:54:59 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36645 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfEaRy7 (ORCPT ); Fri, 31 May 2019 13:54:59 -0400 Received: by mail-qk1-f196.google.com with SMTP id g18so6876041qkl.3; Fri, 31 May 2019 10:54:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Hy/bcA8XBZvnwwAh1TXp+fqxW5RiwbsUNxb0qwOXyik=; b=GNTbUmFYHRAjrHuqdgCzi76DzdQ1URoyPhQw8REkikMjfBNoK+dEBHLK1SyuWO0vwl Gr4kD5OzWVmRZ9gejfNsLI1Ly/lSqUzj+vcF6S6YMa/YdYQxlzhYohmx7OmRhLiSIFyW hhmI+Jw3FUiWaCCS5Ly5HiKlI65iJoWFH1Z3Rua/VoIiHTjpZq38sl7H3u9N7EC2FFls 76SOszhyvZlHgBu1feTbDmo3I9POyWzp69lX0FBBQdxdUkQ4jOkMWpqRJ57wdifIC3xP +m/OiOGWTpoCWAcrMjpQFLy42h7rT2zXFmAMwhDsN8tzY/rOlBReJXeNrNI/lAt+QG1o Jaow== X-Gm-Message-State: APjAAAWib1gro7t7YCUkRXJnDdu7EDYYOfC+eNGBOYy86J9F98XEoMMn UXEUN4MrUFe+HYNmfLDo/A8= X-Received: by 2002:a37:e505:: with SMTP id e5mr9966343qkg.153.1559325297875; Fri, 31 May 2019 10:54:57 -0700 (PDT) Received: from [172.16.0.62] ([177.103.155.130]) by smtp.gmail.com with ESMTPSA id 19sm4357817qtq.12.2019.05.31.10.54.52 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 10:54:56 -0700 (PDT) Subject: Re: [PATCH v3 3/5] drm/msm: fix fb references in async update To: Helen Koike , dri-devel@lists.freedesktop.org, nicholas.kazlauskas@amd.com Cc: andrey.grodzovsky@amd.com, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, Tomasz Figa , boris.brezillon@collabora.com, David Airlie , Sean Paul , kernel@collabora.com, harry.wentland@amd.com, =?UTF-8?Q?St=c3=a9phane_Marchesin?= , stable@vger.kernel.org, Sean Paul , linux-arm-msm@vger.kernel.org, robdclark@gmail.com, =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Maarten Lankhorst , freedreno@lists.freedesktop.org, Mamta Shukla , Daniel Vetter References: <20190314002027.7833-1-helen.koike@collabora.com> <20190314002027.7833-4-helen.koike@collabora.com> From: Helen Koike Openpgp: preference=signencrypt Autocrypt: addr=helen@koikeco.de; keydata= mQINBFmOMD4BEADb2nC8Oeyvklh+ataw2u/3mrl+hIHL4WSWtii4VxCapl9+zILuxFDr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ys4sOe2AMmQGv2MMcJB3aYLzH8f1sEQ9S0UMX7/6CifEG6JodG6Y/W/lLo1VvDxeDA+u4 Lgq6qxlksp8M78FjcmxFVlf4cpCi2ucbZxurhlBkjtZZ8MVAEde3hlqjcBl2Ah6QD826FTxs cOGlHEfNABEBAAGJAjwEGAEKACYCGwwWIQSofQA6zrItXEgHWTzAfqwo9yFiXQUCXEz31QUJ BKaOuQAKCRDAfqwo9yFiXUvnEACBWe8wSnIvSX+9k4LxuLq6GQTOt+RNfliZQkCW5lT3KL1I JyzzOm4x+/slHRBl8bF7KEZyOPinXQXyJ/vgIdgSYxDqoZ7YZn3SvuNe4aT6kGwLEYYEV8Ec j4ets15FR2jSUNnVv5YHWtZ7bP/oUzr2LT54fjRcstYxgwzoj8AREtHQ4EJWAWCOZuEHTSm5 clMFoi41CmG4DlJbzbo4YfilKYm69vwh50Y8WebcRN31jh0g8ufjOJnBldYYBLwNObymhlfy /HKBDIbyCGBuwYoAkoJ6LR/cqzl/FuhwhuDocCGlXyYaJOwXgHaCvVXI3PLQPxWZ+vPsD+TS VHc9m/YWrOiYDnZn6aO0Uk1Zv/m9+BBkWAwsreLJ/evn3SsJV1omNBTITG+uxXcfJkgmmesI Aw8mpI6EeLmReUJLasz8QkzhZIC7t5rGlQI94GQG3Jg2dC+kpaGWOaT5G4FVMcBjiR1nXfMx ENVYnM5ag7mBZyD/kru5W1Uj34L6AFaDMXFPwedSCpzzqUiHb0f+nYkfOodf5xy046+3THy/ NUS/ZZp/rI4F7Y77+MQPVg7vARfHHX1AxYUKfRVW5j88QUB70txn8Vgi1tDrOr4JeD+xr0Cv IGa5lKqgQacQtGkpOpJ8zY4ObSvpNubey/qYUE3DCXD0n2Xxk4muTvqlkFpOYA== Message-ID: Date: Fri, 31 May 2019 14:54:48 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190314002027.7833-4-helen.koike@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 3/13/19 9:20 PM, Helen Koike wrote: > Async update callbacks are expected to set the old_fb in the new_state > so prepare/cleanup framebuffers are balanced. > > Cc: # v4.14+ > Fixes: 224a4c970987 ("drm/msm: update cursors asynchronously through atomic") > Suggested-by: Boris Brezillon > Signed-off-by: Helen Koike > > --- > Hello, > > As mentioned in the cover letter, > But I couldn't test on MSM because I don't have the hardware and I would > appreciate if anyone could test it. I got this tested on a dragonboard 410c, no regressions where found and no extra warnings. These two tests where already failing for other reasons: flip-vs-cursor-crc-atomic flip-vs-cursor-crc-legacy If you want to see the full log: https://people.collabora.com/~koike/drm-fixes-results.zip Thanks Helen > > In other platforms (VC4, AMD, Rockchip), there is a hidden > drm_framebuffer_get(new_fb)/drm_framebuffer_put(old_fb) in async_update > that is wrong, but I couldn't identify those here, not sure if it is hidden > somewhere else, but if tests fail this is probably the cause. > > Thanks! > Helen > > Changes in v3: None > Changes in v2: > - update CC stable and Fixes tag > > drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c > index be13140967b4..b854f471e9e5 100644 > --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c > +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c > @@ -502,6 +502,8 @@ static int mdp5_plane_atomic_async_check(struct drm_plane *plane, > static void mdp5_plane_atomic_async_update(struct drm_plane *plane, > struct drm_plane_state *new_state) > { > + struct drm_framebuffer *old_fb = plane->state->fb; > + > plane->state->src_x = new_state->src_x; > plane->state->src_y = new_state->src_y; > plane->state->crtc_x = new_state->crtc_x; > @@ -524,6 +526,8 @@ static void mdp5_plane_atomic_async_update(struct drm_plane *plane, > > *to_mdp5_plane_state(plane->state) = > *to_mdp5_plane_state(new_state); > + > + new_state->fb = old_fb; > } > > static const struct drm_plane_helper_funcs mdp5_plane_helper_funcs = { >