From patchwork Tue May 13 18:26:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 30130 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CEEF20369 for ; Tue, 13 May 2014 18:27:37 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id m20sf2025060qcx.5 for ; Tue, 13 May 2014 11:27:37 -0700 (PDT) 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:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=DrxF0kQverJz+97vYUbtRCVKTx+3h81AgX8EqmoTOwA=; b=L1lGhsBgz/vD6ovtsxqwGblziQXzuc1x0biHINBOlGQbAYz0bnpmyieymeL4QgonPX eAiAJqlBGUJZwMtVV4ga3A+E0/bXAZvTb5sbHhdfEidNcXpFCsXJs8/wcP1EKcusRslR p7hCVGs6A/Xvf8dvGJnsrPoQZPKPGAvmKSbCy0wgHBKb2sWuRWcP9FzeMoVQ3Fsp6psP w3LeLY8YxmWlClrGwDaXPDljeI1TlxGrmPwM/PIyjPwV04FDnC4oJ5970lAizFp1XqFY dNuE49nweX5yTapiT9JRCvnGHZb7Lwvcbr9XBM4LdVNub48wbtUo5vBfgjbA/4OcU1hg snVg== X-Gm-Message-State: ALoCoQk9UEK56CAc2wXRXVxfPswiUdg5IuVIAH4FFA40pRQfo0Wyx302Uo58sULABeLse8GXkqdB X-Received: by 10.236.77.194 with SMTP id d42mr15389465yhe.21.1400005657025; Tue, 13 May 2014 11:27:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.8 with SMTP id y8ls2082225qgy.11.gmail; Tue, 13 May 2014 11:27:36 -0700 (PDT) X-Received: by 10.220.160.67 with SMTP id m3mr1746681vcx.56.1400005656816; Tue, 13 May 2014 11:27:36 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id p8si2791463vef.68.2014.05.13.11.27.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 11:27:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id la4so1022910vcb.27 for ; Tue, 13 May 2014 11:27:36 -0700 (PDT) X-Received: by 10.52.181.132 with SMTP id dw4mr962180vdc.86.1400005656697; Tue, 13 May 2014 11:27:36 -0700 (PDT) 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.220.221.72 with SMTP id ib8csp172987vcb; Tue, 13 May 2014 11:27:35 -0700 (PDT) X-Received: by 10.68.224.101 with SMTP id rb5mr7119276pbc.135.1400005653644; Tue, 13 May 2014 11:27:33 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id ek4si8386818pbc.296.2014.05.13.11.27.32 for ; Tue, 13 May 2014 11:27:33 -0700 (PDT) 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 7E2407A014; Tue, 13 May 2014 11:27:31 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 40B067A010 for ; Tue, 13 May 2014 11:27:30 -0700 (PDT) Received: by mail-wi0-f181.google.com with SMTP id n15so1109086wiw.14 for ; Tue, 13 May 2014 11:27:29 -0700 (PDT) X-Received: by 10.194.187.107 with SMTP id fr11mr3205051wjc.70.1400005649496; Tue, 13 May 2014 11:27:29 -0700 (PDT) Received: from lmenx321.lme.st.com (lya72-2-88-175-155-153.fbx.proxad.net. [88.175.155.153]) by mx.google.com with ESMTPSA id f7sm23191631wjy.24.2014.05.13.11.27.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 11:27:28 -0700 (PDT) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH v2 19/19] drm: sti: rename mixer registers to be main/aux independent Date: Tue, 13 May 2014 20:26:28 +0200 Message-Id: <1400005588-3974-20-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1400005588-3974-1-git-send-email-benjamin.gaignard@linaro.org> References: <1400005588-3974-1-git-send-email-benjamin.gaignard@linaro.org> Cc: Fabien Dessenne , Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.220.182 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 From: Vincent Abriou Signed-off-by: Benjamin Gaignard Signed-off-by: Vincent Abriou Signed-off-by: Fabien Dessenne --- drivers/gpu/drm/sti/sti_mixer.c | 70 ++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c index fce72e4..73d5405 100644 --- a/drivers/gpu/drm/sti/sti_mixer.c +++ b/drivers/gpu/drm/sti/sti_mixer.c @@ -18,16 +18,16 @@ static const u32 MixerColorSpaceMatIdentity[] = { }; /* regs offset */ -#define GAM_MIXER_MAIN_CTL 0x00 -#define GAM_MIXER_MAIN_BKC 0x04 -#define GAM_MIXER_MAIN_BCO 0x0C -#define GAM_MIXER_MAIN_BCS 0x10 -#define GAM_MIXER_MAIN_AVO 0x28 -#define GAM_MIXER_MAIN_AVS 0x2C -#define GAM_MIXER_MAIN_CRB 0x34 -#define GAM_MIXER_MAIN_ACT 0x38 -#define GAM_MIXER_MAIN_MBP 0x3C -#define GAM_MIXER_MAIN_MX0 0x80 +#define GAM_MIXER_CTL 0x00 +#define GAM_MIXER_BKC 0x04 +#define GAM_MIXER_BCO 0x0C +#define GAM_MIXER_BCS 0x10 +#define GAM_MIXER_AVO 0x28 +#define GAM_MIXER_AVS 0x2C +#define GAM_MIXER_CRB 0x34 +#define GAM_MIXER_ACT 0x38 +#define GAM_MIXER_MBP 0x3C +#define GAM_MIXER_MX0 0x80 /* id for depth of CRB reg */ #define GAM_DEPTH_VID0_ID 1 @@ -82,7 +82,7 @@ static inline void sti_mixer_reg_writemask(struct sti_mixer *mixer, void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable) { sti_mixer_reg_writemask(mixer, - GAM_MIXER_MAIN_CTL, enable, GAM_CTL_BACK_MASK); + GAM_MIXER_CTL, enable, GAM_CTL_BACK_MASK); } static void sti_mixer_set_background_color(struct sti_mixer *mixer, @@ -90,7 +90,7 @@ static void sti_mixer_set_background_color(struct sti_mixer *mixer, { u32 val = (red << 16) | (green << 8) | blue; - sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_BKC, val); + sti_mixer_reg_write(mixer, GAM_MIXER_BKC, val); } static void sti_mixer_set_background_area(struct sti_mixer *mixer, @@ -103,8 +103,8 @@ static void sti_mixer_set_background_area(struct sti_mixer *mixer, xdo = sti_vtg_get_pixel_number(*mode, 0); xds = sti_vtg_get_pixel_number(*mode, mode->hdisplay - 1); - sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_BCO, ydo << 16 | xdo); - sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_BCS, yds << 16 | xds); + sti_mixer_reg_write(mixer, GAM_MIXER_BCO, ydo << 16 | xdo); + sti_mixer_reg_write(mixer, GAM_MIXER_BCS, yds << 16 | xds); } int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer) @@ -143,12 +143,12 @@ int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer) DRM_DEBUG_DRIVER("%s %s depth=%d\n", sti_mixer_to_str(mixer), sti_layer_to_str(layer), depth); - dev_dbg(mixer->dev, "GAM_MIXER_MAIN_CRB val 0x%x mask 0x%x\n", + dev_dbg(mixer->dev, "GAM_MIXER_CRB val 0x%x mask 0x%x\n", layer_id, mask); - sti_mixer_reg_writemask(mixer, GAM_MIXER_MAIN_CRB, layer_id, mask); + sti_mixer_reg_writemask(mixer, GAM_MIXER_CRB, layer_id, mask); - dev_dbg(mixer->dev, "Read GAM_MIXER_MAIN_CRB 0x%x\n", - sti_mixer_reg_read(mixer, GAM_MIXER_MAIN_CRB)); + dev_dbg(mixer->dev, "Read GAM_MIXER_CRB 0x%x\n", + sti_mixer_reg_read(mixer, GAM_MIXER_CRB)); return 0; } @@ -164,8 +164,8 @@ int sti_mixer_active_video_area(struct sti_mixer *mixer, DRM_DEBUG_DRIVER("%s active video area xdo:%d ydo:%d xds:%d yds:%d\n", sti_mixer_to_str(mixer), xdo, ydo, xds, yds); - sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_AVO, ydo << 16 | xdo); - sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_AVS, yds << 16 | xds); + sti_mixer_reg_write(mixer, GAM_MIXER_AVO, ydo << 16 | xdo); + sti_mixer_reg_write(mixer, GAM_MIXER_AVS, yds << 16 | xds); sti_mixer_set_background_color(mixer, 0xFF, 0, 0); @@ -210,7 +210,7 @@ int sti_mixer_set_layer_status(struct sti_mixer *mixer, return -1; } val = status ? mask : 0; - sti_mixer_reg_writemask(mixer, GAM_MIXER_MAIN_CTL, val, mask); + sti_mixer_reg_writemask(mixer, GAM_MIXER_CTL, val, mask); return 0; } @@ -219,7 +219,7 @@ void sti_mixer_set_matrix(struct sti_mixer *mixer) int i; for (i = 0; i < ARRAY_SIZE(MixerColorSpaceMatIdentity); i++) - sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_MX0 + (i * 4), + sti_mixer_reg_write(mixer, GAM_MIXER_MX0 + (i * 4), MixerColorSpaceMatIdentity[i]); } @@ -359,23 +359,23 @@ int sti_mixer_dbg_show(struct seq_file *m, void *arg) struct sti_mixer *mixer = compo->mixer[i]; seq_printf(m, "\n%s", sti_mixer_to_str(mixer)); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_CTL); + MIXER_DBG_DUMP(GAM_MIXER_CTL); sti_mixer_dbg_ctl(m, sti_mixer_reg_read(mixer, - GAM_MIXER_MAIN_CTL)); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_BKC); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_BCO); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_BCS); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_AVO); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_AVS); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_CRB); + GAM_MIXER_CTL)); + MIXER_DBG_DUMP(GAM_MIXER_BKC); + MIXER_DBG_DUMP(GAM_MIXER_BCO); + MIXER_DBG_DUMP(GAM_MIXER_BCS); + MIXER_DBG_DUMP(GAM_MIXER_AVO); + MIXER_DBG_DUMP(GAM_MIXER_AVS); + MIXER_DBG_DUMP(GAM_MIXER_CRB); sti_mixer_dbg_crb(m, sti_mixer_reg_read(mixer, - GAM_MIXER_MAIN_CRB)); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_ACT); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_MBP); - MIXER_DBG_DUMP(GAM_MIXER_MAIN_MX0); - sti_mixer_dbg_mxn(m, mixer->regs + GAM_MIXER_MAIN_MX0); + GAM_MIXER_CRB)); + MIXER_DBG_DUMP(GAM_MIXER_ACT); + MIXER_DBG_DUMP(GAM_MIXER_MBP); + MIXER_DBG_DUMP(GAM_MIXER_MX0); + sti_mixer_dbg_mxn(m, mixer->regs + GAM_MIXER_MX0); seq_puts(m, "\n"); crtc = &mixer->drm_crtc;