From patchwork Wed Oct 30 04:13:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 3112961 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 12699BF924 for ; Wed, 30 Oct 2013 04:14:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A117201F9 for ; Wed, 30 Oct 2013 04:14:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D244201F4 for ; Wed, 30 Oct 2013 04:14:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 479ACEEDF2 for ; Tue, 29 Oct 2013 21:14:18 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from xmailer.gwdg.de (xmailer.gwdg.de [134.76.10.29]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A74FEEDBF; Tue, 29 Oct 2013 21:13:26 -0700 (PDT) Received: from smtp-out.tuebingen.mpg.de ([192.124.26.249] helo=tuebingen.mpg.de) by mailer.gwdg.de with esmtp (Exim 4.80) (envelope-from ) id 1VbN9p-0000dp-3J; Wed, 30 Oct 2013 05:13:25 +0100 Received: from fir.kyb.local (account mario.kleiner@tuebingen.mpg.de [10.38.132.250] verified) by tuebingen.mpg.de (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 25913741; Wed, 30 Oct 2013 05:13:24 +0100 From: Mario Kleiner To: airlied@gmail.com Subject: [PATCH 1/4] drm: Remove preempt_disable() from vblank timestamping code. Date: Wed, 30 Oct 2013 05:13:05 +0100 Message-Id: <1383106388-32481-2-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1383106388-32481-1-git-send-email-mario.kleiner.de@gmail.com> References: <1383106388-32481-1-git-send-email-mario.kleiner.de@gmail.com> MIME-Version: 1.0 X-Virus-Scanned: (clean) by exiscan+sophie Cc: intel-gfx@lists.freedesktop.org, mario.kleiner@tuebingen.mpg.de, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Preemption handling will get pushed into the kms drivers in followup patches, to make timestamping more robust and PREEMPT_RT friendly. Signed-off-by: Mario Kleiner Reviewed-by: Ville Syrjälä Reviewed-by: Alex Deucher --- drivers/gpu/drm/drm_irq.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index f9af048..33ee515 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -586,11 +586,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc, * code gets preempted or delayed for some reason. */ for (i = 0; i < DRM_TIMESTAMP_MAXRETRIES; i++) { - /* Disable preemption to make it very likely to - * succeed in the first iteration even on PREEMPT_RT kernel. - */ - preempt_disable(); - /* Get system timestamp before query. */ stime = ktime_get(); @@ -602,8 +597,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc, if (!drm_timestamp_monotonic) mono_time_offset = ktime_get_monotonic_offset(); - preempt_enable(); - /* Return as no-op if scanout query unsupported or failed. */ if (!(vbl_status & DRM_SCANOUTPOS_VALID)) { DRM_DEBUG("crtc %d : scanoutpos query failed [%d].\n",