From patchwork Fri Oct 31 22:54:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207331 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 E30549F318 for ; Fri, 31 Oct 2014 23:56:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB8BB20176 for ; Fri, 31 Oct 2014 23:56:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8E90820160 for ; Fri, 31 Oct 2014 23:56:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBE356E851; Fri, 31 Oct 2014 16:56:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C6576E854 for ; Fri, 31 Oct 2014 15:57:35 -0700 (PDT) Received: by mail-pa0-f47.google.com with SMTP id kx10so8537570pab.6 for ; Fri, 31 Oct 2014 15:57:35 -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=8CuxclUEn61hkd22ZEPDPsaS9DhXcG+y3mB563NhXpE=; b=ZdrtngMuSLXuJeqvuxjJmpUcxB0kimuWttdiJp1JB8aMiBB4sZMqmXDeiQuso+L20B 8UY8r1q0Haua+hPpsbKULRkG6BN7vi+1ORh3UK3RrkKaw5GdmHRwYtZeeMKm3InrTZKP LRv9TfY8RZzW0LDxp4OD9JOj8V28xNWmn3GeeTdNEV28sg+2cKsL1TxQ1fTvkwelsFQs 7Z0PS/a8Zu2cdLbYYcbWKDEpdz3nh9n+JyPBOQ5his4nCen2UjEErfSS64EHXcDR3jDO SHCaKXft2q7X4J6YZN/03IxYKBWoK0RLlr5rnE0IhvKIA8fSzm3QMgS0gbarkXSS29JY U/0Q== X-Received: by 10.66.122.2 with SMTP id lo2mr27834630pab.9.1414796255503; Fri, 31 Oct 2014 15:57:35 -0700 (PDT) Received: from mothership.mgc.mentorg.com (c-50-152-159-227.hsd1.ca.comcast.net. [50.152.159.227]) by mx.google.com with ESMTPSA id ev8sm10870656pdb.28.2014.10.31.15.57.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:57:34 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 57/72] imx-drm: Add support for interface pixel maps Date: Fri, 31 Oct 2014 15:54:40 -0700 Message-Id: <1414796095-10107-58-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> References: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> X-Mailman-Approved-At: Fri, 31 Oct 2014 16:56:32 -0700 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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 Adds the framework that allows encoder/connector drivers to create a new interface pixel mapping passed to imx_drm_panel_format(). The crtc driver will then pass this pointer on to ipu_dc_init_sync() which sets up the new mapping in the DC. Signed-off-by: Steve Longerbeam --- drivers/staging/imx-drm/imx-drm-core.c | 19 ++++++++++++++----- drivers/staging/imx-drm/imx-drm.h | 12 +++++++++--- drivers/staging/imx-drm/imx-hdmi.c | 3 +-- drivers/staging/imx-drm/imx-ldb.c | 2 +- drivers/staging/imx-drm/imx-tve.c | 5 ++--- drivers/staging/imx-drm/ipuv3-crtc.c | 11 ++++++++--- drivers/staging/imx-drm/ipuv3-plane.c | 2 +- drivers/staging/imx-drm/parallel-display.c | 2 +- 8 files changed, 37 insertions(+), 19 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 4c85fd3..b31d291 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -136,7 +136,9 @@ static struct imx_drm_crtc *imx_drm_find_crtc_by_id(struct drm_device *drm, } int imx_drm_panel_format_pins(struct drm_encoder *encoder, - u32 interface_pix_fmt, int hsync_pin, int vsync_pin) + u32 interface_pix_fmt, + struct ipu_dc_if_map *interface_pix_map, + int hsync_pin, int vsync_pin) { struct imx_drm_crtc_helper_funcs *helper; struct imx_drm_crtc *imx_crtc; @@ -148,15 +150,22 @@ int imx_drm_panel_format_pins(struct drm_encoder *encoder, helper = &imx_crtc->imx_drm_helper_funcs; if (helper->set_interface_pix_fmt) return helper->set_interface_pix_fmt(encoder->crtc, - encoder->encoder_type, interface_pix_fmt, - hsync_pin, vsync_pin); + encoder->encoder_type, + interface_pix_fmt, + interface_pix_map, + hsync_pin, vsync_pin); return 0; } EXPORT_SYMBOL_GPL(imx_drm_panel_format_pins); -int imx_drm_panel_format(struct drm_encoder *encoder, u32 interface_pix_fmt) +int imx_drm_panel_format(struct drm_encoder *encoder, + u32 interface_pix_fmt, + struct ipu_dc_if_map *interface_pix_map) { - return imx_drm_panel_format_pins(encoder, interface_pix_fmt, 2, 3); + return imx_drm_panel_format_pins(encoder, + interface_pix_fmt, + interface_pix_map, + 2, 3); } EXPORT_SYMBOL_GPL(imx_drm_panel_format); diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h index 0bb4735..24b889a 100644 --- a/drivers/staging/imx-drm/imx-drm.h +++ b/drivers/staging/imx-drm/imx-drm.h @@ -1,6 +1,8 @@ #ifndef _IMX_DRM_H_ #define _IMX_DRM_H_ +#include