From patchwork Wed Feb 6 20:08:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10800031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45551922 for ; Wed, 6 Feb 2019 20:08:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 354402C96B for ; Wed, 6 Feb 2019 20:08:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28E4C2D050; Wed, 6 Feb 2019 20:08:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DD3712C96B for ; Wed, 6 Feb 2019 20:08:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86E616EB0A; Wed, 6 Feb 2019 20:08:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D6E76EB0A for ; Wed, 6 Feb 2019 20:08:19 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id b15so9356768qto.8 for ; Wed, 06 Feb 2019 12:08:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ILKlvuUbPFyAG+5JJDItOklQEVaqz1AJ3gr+H60JLxw=; b=sCnDzQgwbC2qGaZ30oWRo5+oSS2PnaMkrFss91o1JMvYe7Nwc3iZPAB+v0Cqyf1VdW NMetvRKWiEamO4dWO3XTdgejnADxPOJTw9tLDxF3EoSwKAWqh6xbbeka5ayQ+zV+fYMl JnBqoKvBF+LLdz7FHZNc4Vq8Q4JbqbKLn8srZSMD/+yo4QlHj7etxVuR9URR3Z6ruhhc 3f5sRiD0pXACPToBAx8Q9sAK+ne85Z9lVv0P8xuoxueEg5qg2Vtmx8TOTmEBk4GfuLy2 7NAiHuXO+7r/RW7aHYBoo2bAmV5zjzGqs2ndnUjRH6ZvyLb3W8Og6M/hohIItQFDWvAK SyHw== X-Gm-Message-State: AHQUAuY2NKb17b/jFM7G6lWzEZHk5P+9dxAanh334NlKXDuzHNNyyc2E Zzi31OzeSnb9FS7oAtIG/QM= X-Google-Smtp-Source: AHgI3IbzgU09qqGx5RVBj/0QrbxhsNXm9gJ5PxGBBRLk6hKjfIXVOTGSHtkj9q2siPlv4hkYuuqadA== X-Received: by 2002:aed:3907:: with SMTP id l7mr9200485qte.65.1549483698482; Wed, 06 Feb 2019 12:08:18 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id p2sm12160754qkg.92.2019.02.06.12.08.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 12:08:17 -0800 (PST) Date: Wed, 6 Feb 2019 18:08:13 -0200 From: Shayenne Moura To: Rodrigo Siqueira , Haneen Mohammed , Daniel Vetter , David Airlie Subject: [PATCH] drm/vkms: WARN when hrtimer_forward_now fails Message-ID: <20190206200813.d5w7gjpepoeeadiy@smtp.gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make the variable have the same type of function hrtimer_forward_now return. Add a warn to verify the hrtimer_forward_now return. Signed-off-by: Shayenne Moura --- drivers/gpu/drm/vkms/vkms_crtc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 5a095610726b..734a3e197df8 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -16,7 +16,7 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) vblank_hrtimer); struct drm_crtc *crtc = &output->crtc; struct vkms_crtc_state *state = to_vkms_crtc_state(crtc->state); - int ret_overrun; + u64 ret_overrun; bool ret; spin_lock(&output->lock); @@ -43,6 +43,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, output->period_ns); + WARN_ON(ret_overrun != 1); + spin_unlock(&output->lock); return HRTIMER_RESTART;