Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A774BC2F421 for ; Mon, 21 Jan 2019 14:58:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7915420879 for ; Mon, 21 Jan 2019 14:58:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D4+lQq2l" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729504AbfAUO6u (ORCPT ); Mon, 21 Jan 2019 09:58:50 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:40082 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729456AbfAUO6t (ORCPT ); Mon, 21 Jan 2019 09:58:49 -0500 Received: by mail-yw1-f66.google.com with SMTP id g194so8106724ywe.7 for ; Mon, 21 Jan 2019 06:58:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=66DhZhAyw2fN3jnogeftSaqOkSXaDTZX+rX+Z0slquQ=; b=D4+lQq2l0uhJFqvQ41UfxSlHkb+YJb5hHD9EV4DUX9C73F+wZKWx+782QKsM72r/wm 1dwtQevOBCn3KsqYHNvkTY4tJktKpSqKsvy2UGU0emUECbGjWWcVT0jbgpWFu7/Im15w iA6qlJw8n/2rSZayahijVBTrYpLkb+SrCxuCES889rCRT+JVsVyCNnQZoCS//5UrI2ii 9nXqTyiSKPpAw3f22EUAkY6qNUr/gDFDUc7as1Bc7c5KDZkxKmd4RNS81UNICyHhoQTG TYy/If8Exr5D/wQeiC04ucHKSZ9eo7NxeNzbEGyW8oEzMQMH/uAOApEVUksagrU0djrB wdyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=66DhZhAyw2fN3jnogeftSaqOkSXaDTZX+rX+Z0slquQ=; b=YmZ+28CWiV+sWxEynavuBYEPqQt7ytVYU979xJP3amG8Z+N+QX6IwiNbvLE8aXhC7F BQyV2FsHbJa6Tb7qY7tVfI4hykpSwAU/W8ulVxrfxatpYPFx6pqo/Q08EM6/OxDLDN0q jIxF46rIRfnb86C5KAmh7oqsh0xWsarD7l+ueQ4XjK2s3tpKxaGLWe+DYvwOgrSGhmpM ULgRW3bE9HcmrUdMjbnqhiT6xKvzLYcRRz4+yKA73ztTdG+aZgNTsB0xb4ZccpQTdwee VfuSJN1PwJ3Kx06FrfsBqkfnY3l99vLOhNxDEeJ4HQNH39jOy2tBX688bIh+0jEniVzQ Q9Lw== X-Gm-Message-State: AJcUukdC6UWXuqW3Suf7Qb5wJe5Qb7XYfv5zUhmjoDX7nnDU5hDH+vV4 VVn1ouqFIZQafYL4M+IQwKhHiKzf X-Google-Smtp-Source: ALg8bN5Z864v9IvfAQiGaIeBgFu2VugJzRhznDM8/n6vMKQ2U2WAZyhxmvDMwzZ7D/litV/rQfwa/A== X-Received: by 2002:a81:2990:: with SMTP id p138mr28937496ywp.359.1548082728123; Mon, 21 Jan 2019 06:58:48 -0800 (PST) Received: from localhost.localdomain ([71.219.49.5]) by smtp.gmail.com with ESMTPSA id f10sm7573706ywb.26.2019.01.21.06.58.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 06:58:47 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: stable@vger.kernel.org Cc: Nicholas Kazlauskas , Harry Wentland , Leo Li , Alex Deucher Subject: [PATCH] drm/amd/display: Fix disabled cursor on top screen edge Date: Mon, 21 Jan 2019 09:58:38 -0500 Message-Id: <20190121145838.15074-1-alexander.deucher@amd.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nicholas Kazlauskas [Why] The cursor vanishes when touching the top of edge of the screen for Raven on Linux. This occurs because the cursor height is not taken into account when deciding to disable the cursor. [How] Factor in the cursor height into the cursor calculations - and mimic the existing x position calculations. Fixes: 94a4ffd1d40b ("drm/amd/display: fix PIP bugs on Dal3") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201815 Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher (cherry picked from commit ae1cf20df7a9c60ff5ef41c3315c33c1a5fafd77) --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c index dcb3c5530236..cd1ebe57ed59 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c @@ -463,7 +463,7 @@ void dpp1_set_cursor_position( if (src_y_offset >= (int)param->viewport.height) cur_en = 0; /* not visible beyond bottom edge*/ - if (src_y_offset < 0) + if (src_y_offset + (int)height <= 0) cur_en = 0; /* not visible beyond top edge*/ REG_UPDATE(CURSOR0_CONTROL, diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c index 74132a1f3046..a34f0fdf7be2 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c @@ -1134,7 +1134,7 @@ void hubp1_cursor_set_position( if (src_y_offset >= (int)param->viewport.height) cur_en = 0; /* not visible beyond bottom edge*/ - if (src_y_offset < 0) //+ (int)hubp->curs_attr.height + if (src_y_offset + (int)hubp->curs_attr.height <= 0) cur_en = 0; /* not visible beyond top edge*/ if (cur_en && REG_READ(CURSOR_SURFACE_ADDRESS) == 0) -- 2.20.1