From patchwork Fri Dec 5 08:35:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 41963 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05B9D26669 for ; Fri, 5 Dec 2014 08:36:10 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf196954eek.5 for ; Fri, 05 Dec 2014 00:36:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:subject:date :message-id:in-reply-to:references:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=94j6OwIZA3UMlneJUjnv8AO/FOfEDEqy0fqZhqR9VPA=; b=AgXqWFm3sKbGNL/+KuDGVB7U8RFOqLHbcWk5m2WiIEUCm42+g5/vdCMJH5z0xac9bu cRPE1vm8zO2J242OJBmvHWbfciDGjt8FvaMCngDpQsVZ5lEiIz+0LjkmWnN9B38NHvrF K8uq3OI0FluQ3gUb9lEcTE7vpiR1QaPo0VSR3+8LvdKVpnCJD4plV0GOe80jGlObBejf t+TAdoS+wtnRcy030CQhkXxluI4ymDsv2fgVx5KBemSsWb/wrB8h2cc26iufW5g+vjn3 xKbkh1lAxZ2pz9l+zIIRskwtN6gdtNzza6JR3GW1WCrDmP7E0xuXtQ/OYTbN6+Y+0kM1 IWNw== X-Gm-Message-State: ALoCoQmkjiSTfbgd4vHIfWPKt5GO1CCYmm8p8FQZjBMSobsAyW2hCZXwVDD8X+fhMSxyLiRXsS2O X-Received: by 10.152.18.136 with SMTP id w8mr218050lad.5.1417768569200; Fri, 05 Dec 2014 00:36:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.227 with SMTP id u3ls373883laa.109.gmail; Fri, 05 Dec 2014 00:36:08 -0800 (PST) X-Received: by 10.152.121.65 with SMTP id li1mr1689251lab.17.1417768568963; Fri, 05 Dec 2014 00:36:08 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id f7si4153388lah.127.2014.12.05.00.36.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Dec 2014 00:36:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id p9so170650lbv.14 for ; Fri, 05 Dec 2014 00:36:08 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr1758673lbc.34.1417768568639; Fri, 05 Dec 2014 00:36:08 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp173503lbc; Fri, 5 Dec 2014 00:36:07 -0800 (PST) X-Received: by 10.70.90.140 with SMTP id bw12mr26365449pdb.35.1417768565251; Fri, 05 Dec 2014 00:36:05 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id os6si46665234pbb.34.2014.12.05.00.36.04 for ; Fri, 05 Dec 2014 00:36:05 -0800 (PST) Received-SPF: none (google.com: dri-devel-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 476986E422; Fri, 5 Dec 2014 00:36:03 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CD9F6E422 for ; Fri, 5 Dec 2014 00:36:01 -0800 (PST) Received: by mail-wg0-f54.google.com with SMTP id l2so273211wgh.27 for ; Fri, 05 Dec 2014 00:36:00 -0800 (PST) X-Received: by 10.194.86.165 with SMTP id q5mr22708844wjz.10.1417768560813; Fri, 05 Dec 2014 00:36:00 -0800 (PST) Received: from lmenx321.lme.st.com (LPuteaux-656-1-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id eu8sm1299618wib.21.2014.12.05.00.35.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Dec 2014 00:36:00 -0800 (PST) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH 6/9] drm: sti: fix hdmi avi infoframe Date: Fri, 5 Dec 2014 09:35:04 +0100 Message-Id: <1417768507-7538-7-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417768507-7538-1-git-send-email-benjamin.gaignard@linaro.org> References: <1417768507-7538-1-git-send-email-benjamin.gaignard@linaro.org> Cc: Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: benjamin.gaignard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The hardware expect to have the infoframe checksum in the first byte. In consequence shift all infoframe on one byte. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_hdmi.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index 1921197..d032e02 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c @@ -272,31 +272,32 @@ static int hdmi_avi_infoframe_config(struct sti_hdmi *hdmi) hdmi_write(hdmi, val, HDMI_SW_DI_CFG); /* Infoframe header */ - val = buffer[0x0]; - val |= buffer[0x1] << 8; - val |= buffer[0x2] << 16; + val = buffer[0]; + val |= buffer[1] << 8; + val |= buffer[2] << 16; hdmi_write(hdmi, val, HDMI_SW_DI_N_HEAD_WORD(HDMI_IFRAME_SLOT_AVI)); /* Infoframe packet bytes */ - val = frame[0x0]; - val |= frame[0x1] << 8; - val |= frame[0x2] << 16; - val |= frame[0x3] << 24; + val = buffer[3]; + val |= *(frame++) << 8; + val |= *(frame++) << 16; + val |= *(frame++) << 24; hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD0(HDMI_IFRAME_SLOT_AVI)); - val = frame[0x4]; - val |= frame[0x5] << 8; - val |= frame[0x6] << 16; - val |= frame[0x7] << 24; + val = *(frame++); + val |= *(frame++) << 8; + val |= *(frame++) << 16; + val |= *(frame++) << 24; hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD1(HDMI_IFRAME_SLOT_AVI)); - val = frame[0x8]; - val |= frame[0x9] << 8; - val |= frame[0xA] << 16; - val |= frame[0xB] << 24; + val = *(frame++); + val |= *(frame++) << 8; + val |= *(frame++) << 16; + val |= *(frame++) << 24; hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD2(HDMI_IFRAME_SLOT_AVI)); - val = frame[0xC]; + val = *(frame++); + val |= *(frame) << 8; hdmi_write(hdmi, val, HDMI_SW_DI_N_PKT_WORD3(HDMI_IFRAME_SLOT_AVI)); /* Enable transmission slot for AVI infoframe