From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maarten Lankhorst Subject: Re: [RFC 8/9] HACK: drm/msm/mdp5: Add support for legacy cursor updates Date: Mon, 19 Dec 2016 13:50:54 +0100 Message-ID: <36492ac2-39e8-5fcd-98e3-2a78f2113c0d@linux.intel.com> References: <1482149338-586-1-git-send-email-architt@codeaurora.org> <1482149338-586-9-git-send-email-architt@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com ([192.55.52.88]:34335 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755091AbcLSMu5 (ORCPT ); Mon, 19 Dec 2016 07:50:57 -0500 In-Reply-To: <1482149338-586-9-git-send-email-architt@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Archit Taneja , robdclark@gmail.com Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, daniel@ffwll.ch Op 19-12-16 om 13:08 schreef Archit Taneja: > This code has been more or less picked up from the vc4 and intel > implementations of update_plane() funcs for cursor planes. > > The update_plane() func is usually the drm_atomic_helper_update_plane > func that will issue an atomic commit with the plane updates. Such > commits are not intended to be done faster than the vsync rate. > > The legacy cursor userspace API, on the other hand, expects the kernel > to handle cursor updates immediately. > > Create a fast path in update_plane, which updates the cursor registers > and flushes the configuration. The fast path is taken when there is only > a change in the cursor's position in the crtc, or a change in the > cursor's crop co-ordinates. For anything else, we go via the slow path. > > We take the slow path even whenever the fb changes, and even when there > is currently no fb tied to the plane. This should hopefully ensure that > we always take a slow path for every new fb. The slow path will ensure > that the fb is prepared/pinned etc. > > Cc: > Signed-off-by: Archit Taneja > --- > - Don't know what to do for locking here :/ Shouldn't patch 9 be done first before 8? ~Maarten