Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755895AbbLAJbj (ORCPT ); Tue, 1 Dec 2015 04:31:39 -0500 Received: from regular1.263xmail.com ([211.150.99.133]:34910 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755822AbbLAJbg (ORCPT ); Tue, 1 Dec 2015 04:31:36 -0500 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-RL-SENDER: mark.yao@rock-chips.com X-FST-TO: tfiga@chromium.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: <9511279f7fc94f36ad4fab15973db2a5> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <565D68F0.3010905@rock-chips.com> Date: Tue, 01 Dec 2015 17:31:28 +0800 From: Mark yao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Daniel Stone CC: David Airlie , Heiko Stuebner , dri-devel , "linux-arm-kernel@lists.infradead.org" , linux-rockchip , Linux Kernel Mailing List , Tomasz Figa Subject: Re: [RFC PATCH 3/9] drm/rockchip: Convert to support atomic API References: <1448940391-23333-1-git-send-email-mark.yao@rock-chips.com> <1448940391-23333-4-git-send-email-mark.yao@rock-chips.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1423 Lines: 41 On 2015年12月01日 16:18, Daniel Stone wrote: > Hi Mark, > > On 1 December 2015 at 03:26, Mark Yao wrote: >> >+static void rockchip_atomic_wait_for_complete(struct drm_atomic_state *state) >> >+{ >> >+ struct drm_crtc_state *crtc_state; >> >+ struct drm_crtc *crtc; >> >+ int i; >> >+ >> >+ for_each_crtc_in_state(state, crtc, crtc_state, i) { >> >+ if (!crtc->state->active) >> >+ continue; >> >+ >> >+ WARN_ON(drm_crtc_vblank_get(crtc)); >> >+ } >> >+ >> >+ for_each_crtc_in_state(state, crtc, crtc_state, i) { >> >+ if (!crtc->state->active) >> >+ continue; >> >+ >> >+ rockchip_crtc_wait_for_update(crtc); >> >+ } > I'd be much more comfortable if this passed in an explicit pointer to > state, or an address to wait for, rather than have wait_for_complete > dig out state with no locking. The latter is potentially racy for > async operations. > Hi Daniel "if this passed in an explicit pointer to state, or an address to wait for", I don't understand, can you point how it work? -- Mark Yao -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/