From patchwork Tue Apr 8 12:19:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 27972 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EEEB120553 for ; Tue, 8 Apr 2014 12:20:59 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf3696844iec.10 for ; Tue, 08 Apr 2014 05:20:59 -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=yu6LJJv+l5NwBWxCxuRGNFyocK1yVOiczk/jO35NDtU=; b=BcaswzOHApZvgAcQu1C/1qK5QLaw8s8MDvLnWTsYIkBdS0CAtmhBRYeXggCr17iQqO g+TQk34Lfr2OfLnjSXNq/htjNSQTQ95LU5WYFRhveHLGAOJhnZm1KDUPgC3K70f9dfAj S7deTzH3VGWQDfjx6WN/QIyUvlzKNR33SZROhuMT6gH6bhImjs8Ioeo0im8/hYdrx6+O Y9YDMijg5Rwea9r0mOgaVqpvxQHzhyayUDQ3HjgCLr9SxpU1V0vudMntuM3aYThNdKTX MIJHfNQ642J4FcWP5xboUYm8YkPTTt/nGp19v3zkybHWJGEmkcOjCyMDd4+9rJBFgE9R NOZA== X-Gm-Message-State: ALoCoQkrnqf5oD54Vqn4TtyrLyNHRZOiZUnXz8IrhY87+vWwmh3Fbkzq3WCW1d1lQl3x5FO0iAf9 X-Received: by 10.42.13.198 with SMTP id e6mr1388645ica.21.1396959659486; Tue, 08 Apr 2014 05:20:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.133 with SMTP id v5ls172841qgv.23.gmail; Tue, 08 Apr 2014 05:20:59 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr2552391vdb.18.1396959659312; Tue, 08 Apr 2014 05:20:59 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id m14si355693vcn.125.2014.04.08.05.20.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:20:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so651618vcb.5 for ; Tue, 08 Apr 2014 05:20:59 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr59512vdc.34.1396959659235; Tue, 08 Apr 2014 05:20:59 -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.12.8 with SMTP id v8csp240737vcv; Tue, 8 Apr 2014 05:20:58 -0700 (PDT) X-Received: by 10.66.140.104 with SMTP id rf8mr4125659pab.107.1396959658399; Tue, 08 Apr 2014 05:20:58 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id a8si994654pbs.156.2014.04.08.05.20.57 for ; Tue, 08 Apr 2014 05:20:58 -0700 (PDT) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B99556EA09; Tue, 8 Apr 2014 05:20:56 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BE426E9FB for ; Tue, 8 Apr 2014 05:20:54 -0700 (PDT) Received: by mail-wg0-f50.google.com with SMTP id x13so871479wgg.9 for ; Tue, 08 Apr 2014 05:20:53 -0700 (PDT) X-Received: by 10.180.188.229 with SMTP id gd5mr31465640wic.54.1396959653648; Tue, 08 Apr 2014 05:20:53 -0700 (PDT) Received: from lmenx321.lme.st.com (LPuteaux-656-01-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id v6sm2683904wif.0.2014.04.08.05.20.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:20:52 -0700 (PDT) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH v1 19/19] drm: sti: rename mixer registers to be main/aux independent Date: Tue, 8 Apr 2014 14:19:26 +0200 Message-Id: <1396959566-2960-20-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1396959566-2960-1-git-send-email-benjamin.gaignard@linaro.org> References: <1396959566-2960-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=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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;