From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com ([209.85.212.179]:37443 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755796AbbGUJrT (ORCPT ); Tue, 21 Jul 2015 05:47:19 -0400 Received: by wibud3 with SMTP id ud3so121661596wib.0 for ; Tue, 21 Jul 2015 02:47:17 -0700 (PDT) Date: Tue, 21 Jul 2015 11:49:58 +0200 From: Daniel Vetter To: Chris Wilson , Daniel Vetter , =?utf-8?Q?Micha=C5=82?= Winiarski , intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: Use two 32bit reads for select 64bit REG_READ ioctls Message-ID: <20150721094957.GI16722@phenom.ffwll.local> References: <1437045549-15455-1-git-send-email-michal.winiarski@intel.com> <1437046676-31811-1-git-send-email-chris@chris-wilson.co.uk> <20150717151025.GA26539@mwiniars-desk1.igk.intel.com> <20150721064931.GM16722@phenom.ffwll.local> <20150721094545.GD6166@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150721094545.GD6166@nuc-i3427.alporthouse.com> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Jul 21, 2015 at 10:45:45AM +0100, Chris Wilson wrote: > On Tue, Jul 21, 2015 at 08:49:31AM +0200, Daniel Vetter wrote: > > On Fri, Jul 17, 2015 at 05:10:25PM +0200, Michał Winiarski wrote: > > > On Thu, Jul 16, 2015 at 12:37:56PM +0100, Chris Wilson wrote: > > > > Since the hardware sometimes mysteriously totally flummoxes the 64bit > > > > read of a 64bit register when read using a single instruction, split the > > > > read into two instructions. Since the read here is of automatically > > > > incrementing timestamp counters, we also have to be very careful in > > > > order to make sure that it does not increment between the two > > > > instructions. > > > > > > > > However, since userspace tried to workaround this issue and so enshrined > > > > this ABI for a broken hardware read and in the process neglected that > > > > the read only fails in some environments, we have to introduce a new > > > > uABI flag for userspace to request the 2x32 bit accurate read of the > > > > timestamp. > > > > > > > > v2: Fix alignment check and include details of the workaround for > > > > userspace. > > > > > > > > Reported-by: Karol Herbst > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91317 > > > > Testcase: igt/gem_reg_read > > > Tested-by: Michał Winiarski > > > > Where are the mesa/beignet/libva patches for this? > > Trivial. Absolutely trivial. Just waiting for the kernel. Well still not how it should be done, so I guess you owe me them all ;-) Anyway, applied to -fixes. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch