From patchwork Thu Jul 10 21:50:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 4528091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 21E8A9F37C for ; Thu, 10 Jul 2014 23:33:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13F0A201DE for ; Thu, 10 Jul 2014 23:33:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3EE112011D for ; Thu, 10 Jul 2014 23:33:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D7C496E765; Thu, 10 Jul 2014 16:33:13 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id D80206E01B for ; Thu, 10 Jul 2014 14:52:21 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id hi2so5318030wib.5 for ; Thu, 10 Jul 2014 14:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1cB9bdbKwbm/MCj5NOaML9daY2f2zmE7lwdmXghy298=; b=p3Q0DGBVLDihYhifkejJ1t0CQ1HmgYClFTbFjRWFZ0A93G3UYsyKGGbNwogufZIOX8 3kt2DpS9KbdTot+4WM40COaHTccyylvn5i58rmHkxGL9eLL0faoOmhyP+prm/RQKb82j GoqcBplgYfmkeads4jmYcAl3zcInDqqAWWidDbRUufu6izZSG1JYFq7hwn92fshw6jMO b11v+OjXcLjPyXypGnsnMttny9+iDcMa7rzdVyJQVqJu/T6Dj5HBWRhcD31sjz48tVz3 vdDvusccZ8Aga4hNCdxu57sXhLCA9Rpf3h51StemeE0CT8pA+0AWa5Ztswzh40vOCj4T bvHA== X-Received: by 10.180.19.1 with SMTP id a1mr3547212wie.16.1405029140083; Thu, 10 Jul 2014 14:52:20 -0700 (PDT) Received: from localhost.localdomain ([77.127.59.49]) by mx.google.com with ESMTPSA id n2sm805353wjf.40.2014.07.10.14.52.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Jul 2014 14:52:19 -0700 (PDT) From: Oded Gabbay X-Google-Original-From: Oded Gabbay To: David Airlie , Alex Deucher , Jerome Glisse Subject: [PATCH 24/83] drm/radeon/cik: Call kfd isr function Date: Fri, 11 Jul 2014 00:50:24 +0300 Message-Id: <1405029027-6085-23-git-send-email-oded.gabbay@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405029027-6085-1-git-send-email-oded.gabbay@amd.com> References: <1405029027-6085-1-git-send-email-oded.gabbay@amd.com> X-Mailman-Approved-At: Thu, 10 Jul 2014 16:33:12 -0700 Cc: Andrew Lewycky , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, =?UTF-8?q?Christian=20K=C3=B6nig?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When radeon handles interrupts for cik, propogate this interrupt to kfd. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/cik.c | 4 ++++ drivers/gpu/drm/radeon/radeon_kfd.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 803d0cb..6f4999a 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -140,6 +140,7 @@ static void cik_enable_gui_idle_interrupt(struct radeon_device *rdev, bool enable); extern void radeon_kfd_suspend(struct radeon_device *rdev); extern int radeon_kfd_resume(struct radeon_device *rdev); +extern void radeon_kfd_interrupt(struct radeon_device *rdev, const void *ih_ring_entry); /* get temperature in millidegrees */ int ci_get_temp(struct radeon_device *rdev) @@ -7703,6 +7704,9 @@ restart_ih: while (rptr != wptr) { /* wptr/rptr are in bytes! */ ring_index = rptr / 4; + + radeon_kfd_interrupt(rdev, (const void *) &rdev->ih.ring[ring_index]); + src_id = le32_to_cpu(rdev->ih.ring[ring_index]) & 0xff; src_data = le32_to_cpu(rdev->ih.ring[ring_index + 1]) & 0xfffffff; ring_id = le32_to_cpu(rdev->ih.ring[ring_index + 2]) & 0xff; diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index e3af85b..f4cc3c5 100644 --- a/drivers/gpu/drm/radeon/radeon_kfd.c +++ b/drivers/gpu/drm/radeon/radeon_kfd.c @@ -124,6 +124,12 @@ void radeon_kfd_device_fini(struct radeon_device *rdev) } } +void radeon_kfd_interrupt(struct radeon_device *rdev, const void *ih_ring_entry) +{ + if (rdev->kfd) + kgd2kfd->interrupt(rdev->kfd, ih_ring_entry); +} + void radeon_kfd_suspend(struct radeon_device *rdev) { if (rdev->kfd)