From patchwork Thu Jul 30 15:24:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vathsala nagaraju X-Patchwork-Id: 6903571 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F0AE59F38B for ; Thu, 30 Jul 2015 15:24:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C7FF205EB for ; Thu, 30 Jul 2015 15:24:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AF876205B8 for ; Thu, 30 Jul 2015 15:24:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D82FC6E118; Thu, 30 Jul 2015 08:24:36 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 213116E118 for ; Thu, 30 Jul 2015 08:24:36 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 30 Jul 2015 08:24:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,577,1432623600"; d="scan'208";a="616092064" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga003.jf.intel.com with ESMTP; 30 Jul 2015 08:24:34 -0700 Received: from bgsmsx102.gar.corp.intel.com (10.223.4.172) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 30 Jul 2015 23:24:34 +0800 Received: from bgsmsx103.gar.corp.intel.com ([169.254.4.61]) by BGSMSX102.gar.corp.intel.com ([169.254.2.250]) with mapi id 14.03.0224.002; Thu, 30 Jul 2015 20:54:32 +0530 From: "Nagaraju, Vathsala" To: "Manna, Animesh" , "intel-gfx@lists.freedesktop.org" Thread-Topic: [Intel-gfx] [PATCH 18/18] drm/i915/gen9: Removed byte swapping for csr firmware. Thread-Index: AQHQxwxVUZCGIuGCAUewH3+rfQ4qTp30KIlA Date: Thu, 30 Jul 2015 15:24:32 +0000 Message-ID: References: <1437850839-16782-1-git-send-email-animesh.manna@intel.com> <1437850839-16782-19-git-send-email-animesh.manna@intel.com> In-Reply-To: <1437850839-16782-19-git-send-email-animesh.manna@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Cc: Vatsala Nagaraju Subject: Re: [Intel-gfx] [PATCH 18/18] drm/i915/gen9: Removed byte swapping for csr firmware. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 memcpy(dmc_payload, &fw->data[readcount], dmc_header->fw_size); dmc_header->fw_size is wrong. This will result in 0's after 0x80734 location, results in system hang. -----Original Message----- From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Animesh Manna Sent: Sunday, July 26, 2015 12:31 AM To: intel-gfx@lists.freedesktop.org Cc: Vatsala Nagaraju Subject: [Intel-gfx] [PATCH 18/18] drm/i915/gen9: Removed byte swapping for csr firmware. Cc: Damien Lespiau Cc: Imre Deak Cc: Sunil Kamath Signed-off-by: Animesh Manna Signed-off-by: Vatsala Nagaraju --- drivers/gpu/drm/i915/intel_csr.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.0.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c index 1858f02..50779e0 100644 --- a/drivers/gpu/drm/i915/intel_csr.c +++ b/drivers/gpu/drm/i915/intel_csr.c @@ -328,16 +328,7 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, return NULL; } - for (i = 0; i < dmc_header->fw_size; i++) { - uint32_t *tmp = (u32 *)&fw->data[readcount + i * 4]; - /* - * The firmware payload is an array of 32 bit words stored in - * little-endian format in the firmware image and programmed - * as 32 bit big-endian format to memory. - */ - dmc_payload[i] = (uint32_t __force) cpu_to_be32(*tmp); - } - + memcpy(dmc_payload, &fw->data[readcount], dmc_header->fw_size); return dmc_payload; }