Received: by 10.213.65.68 with SMTP id h4csp470897imn; Tue, 13 Mar 2018 10:04:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELvqV0Q9RQKE4Gduka1e5th0NnrKTbe4STJW9SWzM2MuqdpPAUMenYcIV4UjUBzGqKhSfvRH X-Received: by 10.99.2.140 with SMTP id 134mr1068108pgc.117.1520960681322; Tue, 13 Mar 2018 10:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960681; cv=none; d=google.com; s=arc-20160816; b=vgXgecYWwfHsPpp8L9oh8645ketutyD/LXBHJCJKxBRp/We5PaOeIZt5n23hOJJEyi xB2B46ZWr3yfEDLguBtkfTpNff327HCmzGBkASKO3485XMhu0TY7c2UOM2Y1kDDjUPYf jlZzU7VL3t6nk7CUqrZM6qMHBFKuHJ0Epax6PTM5LLwyuHChmGcxszrAji4382JBSuum W77bNgelpvN08W8YgPa62FPiLeom/mNZb5EBdbPJP/hzTXZWoI7UXjTOraIpfTXBdIgJ ojZhF+NzU9mx2GiY1JEhXfaYcdvhufpAvDWoWsOXGGJWGipQCLYr7YqoG5qFXvPEAWKm 8WRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=1bGI0z9DGhfbH/c5b/BVHa3AlUAXtWUcPHoAtttE/mQ=; b=EKrLpq3QVzvQrRY414XZpml90H0rvCdcheqHaeg7LMD5mRcRAMZdbdajW1fNoyoDSI w3e9cofoKFt7VuAevJK8iuDl6ysRCEU3OCcjabYU2OokS5Xewy2+s9J/ddEdspC0BvrI nb9r2/CYqLBSoZoROeCYnB6wRHG6cAxGI82rWAhkjkQ7X1iP2X8gYi7hMe+WQP6Hs/NP YuY2PvzpoDiNZahdCJvIaqIL+jVd2/fOWw2ce6SWWc2CxpF6WYz7ASpnEK4jSM7PDCUa LFK0mWgpH0uxUnKWYmyNGeKUob5vteOLjWpqrlCuq5k/81mb7Ca0SNAmG9I6vPV7tXA6 EiCw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24-v6si396116pll.83.2018.03.13.10.04.27; Tue, 13 Mar 2018 10:04:41 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932847AbeCMP2o (ORCPT + 99 others); Tue, 13 Mar 2018 11:28:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58124 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932826AbeCMP2m (ORCPT ); Tue, 13 Mar 2018 11:28:42 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D10EEDFE; Tue, 13 Mar 2018 15:28:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shirish S , Harry Wentland , Alex Deucher Subject: [PATCH 4.15 029/146] drm/amd/display: check for ipp before calling cursor operations Date: Tue, 13 Mar 2018 16:23:16 +0100 Message-Id: <20180313152322.764598321@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shirish S commit d6b6669762898dfc99e9273b8d8603bc47014aa9 upstream. Currently all cursor related functions are made to all pipes that are attached to a particular stream. This is not applicable to pipes that do not have cursor plane initialised like underlay. Hence this patch allows cursor related operations on a pipe only if ipp in available on that particular pipe. The check is added to set_cursor_position & set_cursor_attribute. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c @@ -200,7 +200,8 @@ bool dc_stream_set_cursor_attributes( for (i = 0; i < MAX_PIPES; i++) { struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; - if (pipe_ctx->stream != stream || (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp)) + if (pipe_ctx->stream != stream || (!pipe_ctx->plane_res.xfm && + !pipe_ctx->plane_res.dpp) || !pipe_ctx->plane_res.ipp) continue; if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) continue; @@ -276,7 +277,8 @@ bool dc_stream_set_cursor_position( if (pipe_ctx->stream != stream || (!pipe_ctx->plane_res.mi && !pipe_ctx->plane_res.hubp) || !pipe_ctx->plane_state || - (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp)) + (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp) || + !pipe_ctx->plane_res.ipp) continue; if (pipe_ctx->plane_state->address.type