From patchwork Fri Jul 8 20:54:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 12911882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 905E2C43334 for ; Fri, 8 Jul 2022 20:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240332AbiGHUyy (ORCPT ); Fri, 8 Jul 2022 16:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240335AbiGHUyx (ORCPT ); Fri, 8 Jul 2022 16:54:53 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D6B7240B8; Fri, 8 Jul 2022 13:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1657313665; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CstdOR1GH8PTss/tJU+TspqDPaPgCuNQmeryFjsonoU=; b=TPmZ7n5f1FV3VmbioC9/itJnqP+g7Wd+oEJvJgMscumGiuhjgGrq75k36fLXS2/cnIR/yE H0ulKt9cE8YSO7jkAhHeztipZVZmMtGTmHgMw87bRNGh9fZ8harlsb9UYwqjjgmLsKlIWs AkzukoBLeReRnCs8F1cNUF+lUN46108= From: Paul Cercueil To: David Airlie , Daniel Vetter Cc: Sam Ravnborg , Christophe Branchereau , list@opendingux.net, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Paul Cercueil Subject: [PATCH 4/6] drm/ingenic: Don't request full modeset if property is not modified Date: Fri, 8 Jul 2022 21:54:04 +0100 Message-Id: <20220708205406.96473-5-paul@crapouillou.net> In-Reply-To: <20220708205406.96473-1-paul@crapouillou.net> References: <20220708205406.96473-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Avoid requesting a full modeset if the sharpness property is not modified, because then we don't actually need it. Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-ipu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-ipu.c b/drivers/gpu/drm/ingenic/ingenic-ipu.c index 32a50935aa6d..d13f58ad4769 100644 --- a/drivers/gpu/drm/ingenic/ingenic-ipu.c +++ b/drivers/gpu/drm/ingenic/ingenic-ipu.c @@ -697,10 +697,12 @@ ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane, { struct ingenic_ipu *ipu = plane_to_ingenic_ipu(plane); struct drm_crtc_state *crtc_state; + bool mode_changed; if (property != ipu->sharpness_prop) return -EINVAL; + mode_changed = val != ipu->sharpness; ipu->sharpness = val; if (state->crtc) { @@ -708,7 +710,7 @@ ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane, if (WARN_ON(!crtc_state)) return -EINVAL; - crtc_state->mode_changed = true; + crtc_state->mode_changed |= mode_changed; } return 0;