Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3770100pxf; Mon, 29 Mar 2021 10:53:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVdO2MqKOgA1TEq4RkhqvDLqBoBsE4LUMihN/jggGSwB6/491rXOMMU3/yPdAhR+6RE5ZE X-Received: by 2002:a17:906:f896:: with SMTP id lg22mr28655781ejb.124.1617040404114; Mon, 29 Mar 2021 10:53:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617040404; cv=none; d=google.com; s=arc-20160816; b=MWdmGT19OilnmJpMn+/WAdfOIEY7EERakdDywOZgNtxX1j8Qk4DPG47fFHMF90Ur6H QASS1sPSLj0JsWwGZNpukjrNPxDWcN9wL/sEKjM+xoN+yBxZxpDAQ96uB/HcX8899bfl 1y0ZnuAYWN+femJqVanfhddEGOJMVTIrCt5AivfnVCHVY9KdbidHWSR4BbPuTsbBCI6i OOJOQXrLnSreVKntlYq5VGD3JEAlotjE11P5meMINkWyQWlHGJt9hEwCs8UosVz2lC2i pI2gf2iivMKuVaDVwms4UA5IepVuujJvLETex+xCuATUqcHwKufVYXuF/2h9suVs0QqT 0+3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zalRMiyWyoC0wxnT/OvB9BSs7AlIcvbZTrMRY8XmJWo=; b=LKTw6mLZcurfNPTntXvfVvL0uomUo6XICKF29+kDM8OyCtOXgCpoVyRNIdMtUFiezH zoT989hfLD4iooljZtBrH45h7RrGvNzPWngYeMXDLmYDahVmkrT0sRtoLJul4djj2J8d RSiQKOtgMNgZyGbcLA7a3Cw1YiRZj1smXti9arKcWz/PmLaGCkDDi7fcvJLg3qdrBZjp Gdx2b61pk2GB2o5sM9yDJqSywBaAH+VnHg21EpL2w5ExV7gUme3gOUrYq0sP7g5pOqJS oYTZk774cLGZ6ShFcJEoGPvpoFkOQvhTzG1tC8Kemdrm0aNr5DPbM3NREC9fqTN9OOfP jPnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fx21si12869351ejb.91.2021.03.29.10.53.01; Mon, 29 Mar 2021 10:53:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231340AbhC2Rvk (ORCPT + 99 others); Mon, 29 Mar 2021 13:51:40 -0400 Received: from aposti.net ([89.234.176.197]:38890 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbhC2RvT (ORCPT ); Mon, 29 Mar 2021 13:51:19 -0400 From: Paul Cercueil To: David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Simon Ser Cc: Sam Ravnborg , od@zcrc.me, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Paul Cercueil , stable@vger.kernel.org Subject: [PATCH 2/2] drm/ingenic: Don't request full modeset if property is not modified Date: Mon, 29 Mar 2021 18:50:46 +0100 Message-Id: <20210329175046.214629-3-paul@crapouillou.net> In-Reply-To: <20210329175046.214629-1-paul@crapouillou.net> References: <20210329175046.214629-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid requesting a full modeset if the sharpness property is not modified, because then we don't actually need it. Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") Cc: # 5.8+ 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 3b1091e7c0cd..95b665c4a7b0 100644 --- a/drivers/gpu/drm/ingenic/ingenic-ipu.c +++ b/drivers/gpu/drm/ingenic/ingenic-ipu.c @@ -640,10 +640,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) { @@ -651,7 +653,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; -- 2.30.2