Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7277912imu; Wed, 14 Nov 2018 14:44:14 -0800 (PST) X-Google-Smtp-Source: AJdET5edC1meNt3q01lpNCXj8La3XIBM6it9FFSPW1Pi2bE3Pg/5/avw3lftwC3jb8y7NMsjq+rn X-Received: by 2002:a63:d301:: with SMTP id b1mr3527171pgg.61.1542235454833; Wed, 14 Nov 2018 14:44:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542235454; cv=none; d=google.com; s=arc-20160816; b=FIiKJNj/UAMf95X7r2kk6ZvQdoOVL5/6E4k0ozYXq+igErZ7egheF53b8NAV5/qbJ6 pBCbw7o1gtFSJt6LVa6xNLpCeq+3DWhmar6Wsg8IyFO6DZkj/5vC5qTjQ3kTSpPxwaSl gf+KGOb4tRkfFgbm9dMkrljd14CIYHWsC2nZtyN0WnIQEB6Z+0FJJoZjpexnNOwfy465 K4C4/gmPVwB81EB8guUvAJN0v3FzmyvC0poSGtHONN9O28+/Evp8fxLaHPwEcu6mHq37 0aqzln5ZBiwPU6YgRoSEkpe9h6O96gZ5J0dmg9ZX7GxzfCi/jsnJc8x+BKuWhDGK02oZ yNRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=U3QOb0c4ahSyAwfPsCxBcGSavpcVOCh07nEzFYh+rBI=; b=rW5D00gF4FQfO4jUGTjwdku+hJUehJN8Sqn6DPrLyJJFSlHFSFQ+T/bgzhMKrhR1Fm EX0qNXvb0E4KzV3N9fVMv8ywnt9Z9Lucqi3+BTTE7jcFh7d+++z/0BnEHmMYhSmVsIDk BQ7biQbq/fW1Ni3R6JGETSDKKKB7KESsMDFKLKWrqbt29zGR1Mjk5o5fwLQcFMh6A5Pt xc4HYyswauBHaoa8Wfs+NnxKvpK/bEaUpo5heZ01ji/SPlWMUHa9uyN5Du8jh6HrSnkt TSAx+nNcZjwP9RoJRVm+Cczo4qyJmvBkHdHE2+YPsianBEHBJiD6KN3b/Vtge4nNAWVa jQvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bqRxH7ty; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x186-v6si27597775pfx.94.2018.11.14.14.43.59; Wed, 14 Nov 2018 14:44:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bqRxH7ty; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728681AbeKOI1U (ORCPT + 99 others); Thu, 15 Nov 2018 03:27:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:34470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728597AbeKOI1T (ORCPT ); Thu, 15 Nov 2018 03:27:19 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3A96E22511; Wed, 14 Nov 2018 22:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234136; bh=1CXasTFvsZWPK7WOW//EDKwxwHJs7EZbFAtTmH6oN4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bqRxH7ty4YhvweREmhB3dQDvYct8bAPEXCInWfMs+R1VqVRpyTL9Dr0DZV8bF1e5e r+4Vuy5NzlY+FTqyyZCL/jnDvCwSWM1tkCDfDF2u6ObknjxVt0nLEFqyn0Rbf+kb4f wUpqbSK3Ng0kV4s8gy2Z5OS1QkaBk/LU2THcEk8A= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Inki Dae , Sasha Levin Subject: [PATCH AUTOSEL 4.19 33/73] Revert "drm/exynos/decon5433: implement frame counter" Date: Wed, 14 Nov 2018 17:21:27 -0500 Message-Id: <20181114222207.98701-33-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Inki Dae [ Upstream commit 6ca469e22a30992b4478d2ab88737c70667c1e00 ] This reverts commit 0586feba322e1de05075700eb4b835c8b683e62b This patch makes it to need get_vblank_counter callback in crtc to get frame counter from decon driver. However, drm_dev->max_vblank_count is a member unique to vendor's DRM driver but in case of ARM DRM, some CRTC devices don't provide the frame counter value. As a result, this patch made extension and clone mode not working. Instead of this patch, we may need separated max_vblank_count which belongs to each CRTC device, or need to implement frame counter emulation for them who don't support HW frame counter. Signed-off-by: Inki Dae Signed-off-by: Sasha Levin --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 9 --------- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 ----------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 - 3 files changed, 21 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 94529aa82339..aef487dd8731 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -164,13 +164,6 @@ static u32 decon_get_frame_count(struct decon_context *ctx, bool end) return frm; } -static u32 decon_get_vblank_counter(struct exynos_drm_crtc *crtc) -{ - struct decon_context *ctx = crtc->ctx; - - return decon_get_frame_count(ctx, false); -} - static void decon_setup_trigger(struct decon_context *ctx) { if (!ctx->crtc->i80_mode && !(ctx->out_type & I80_HW_TRG)) @@ -536,7 +529,6 @@ static const struct exynos_drm_crtc_ops decon_crtc_ops = { .disable = decon_disable, .enable_vblank = decon_enable_vblank, .disable_vblank = decon_disable_vblank, - .get_vblank_counter = decon_get_vblank_counter, .atomic_begin = decon_atomic_begin, .update_plane = decon_update_plane, .disable_plane = decon_disable_plane, @@ -554,7 +546,6 @@ static int decon_bind(struct device *dev, struct device *master, void *data) int ret; ctx->drm_dev = drm_dev; - drm_dev->max_vblank_count = 0xffffffff; for (win = ctx->first_win; win < WINDOWS_NR; win++) { ctx->configs[win].pixel_formats = decon_formats; diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index eea90251808f..2696289ecc78 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -162,16 +162,6 @@ static void exynos_drm_crtc_disable_vblank(struct drm_crtc *crtc) exynos_crtc->ops->disable_vblank(exynos_crtc); } -static u32 exynos_drm_crtc_get_vblank_counter(struct drm_crtc *crtc) -{ - struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); - - if (exynos_crtc->ops->get_vblank_counter) - return exynos_crtc->ops->get_vblank_counter(exynos_crtc); - - return 0; -} - static const struct drm_crtc_funcs exynos_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, @@ -181,7 +171,6 @@ static const struct drm_crtc_funcs exynos_crtc_funcs = { .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .enable_vblank = exynos_drm_crtc_enable_vblank, .disable_vblank = exynos_drm_crtc_disable_vblank, - .get_vblank_counter = exynos_drm_crtc_get_vblank_counter, }; struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index c737c4bd2c19..630f1edc5de2 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -133,7 +133,6 @@ struct exynos_drm_crtc_ops { void (*disable)(struct exynos_drm_crtc *crtc); int (*enable_vblank)(struct exynos_drm_crtc *crtc); void (*disable_vblank)(struct exynos_drm_crtc *crtc); - u32 (*get_vblank_counter)(struct exynos_drm_crtc *crtc); enum drm_mode_status (*mode_valid)(struct exynos_drm_crtc *crtc, const struct drm_display_mode *mode); bool (*mode_fixup)(struct exynos_drm_crtc *crtc, -- 2.17.1