From patchwork Wed Oct 31 10:01:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1677931 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 5F59C4005F for ; Wed, 31 Oct 2012 10:12:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3300CA0B04 for ; Wed, 31 Oct 2012 03:12:35 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BAB4A087F for ; Wed, 31 Oct 2012 03:10:13 -0700 (PDT) Received: by mail-ea0-f177.google.com with SMTP id n13so482104eaa.36 for ; Wed, 31 Oct 2012 03:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=IKhyDLrD3MnTsEvWnQF2K1d03LmpFTlPLbbtRSymLUk=; b=W61Lf/M8olaW8ta1lmjtN2YxT7r6hsmYD/9d3ADMzIVsD5K8Rl26eDde1FD+Iyc9co 0Rtk65+Ob6wGuETKpN7ArYQBuFPoZP1gLsKqlJCRFsbmmq0sYYLb3HMfzvTu2Fgb3RVk N77MK390lKUW4e2j7twedDaIsqKyYgsVEDWv4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=IKhyDLrD3MnTsEvWnQF2K1d03LmpFTlPLbbtRSymLUk=; b=eJ/LkDk40FcyK3z3/gBaKm6QDQhrfTivTMuKmjgwYBiPOHRFbWUTMvKQAbaB4EIzrg M9QrG47uSv1nS4np4034qoO9xJBd0uzMfk4kTAtUdjfnC4icfZyUUr7pfWj3dxj5QwVk qGn8nz5q1gf7qc0uVlcMq201M6Dadk0euY95KcrJ6eoA+a/f7AI3yKsjcCYriS7LhTa5 RdzVgIb7Gn9flkbpxCHC4trmZ0fosHgKKrCUwVBvsNrVThcpbqEI3EejLloYdPMxZEZS dSJYg4/69EPfHTXyQzzsrYPtwLkIvsA4zqEaOS0kn8cXuJRwpVWTsYhTEVSTaNbjHKeY jM/w== Received: by 10.14.194.136 with SMTP id m8mr83591383een.10.1351678212411; Wed, 31 Oct 2012 03:10:12 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id f2sm7045485eep.2.2012.10.31.03.10.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Oct 2012 03:10:11 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 3/3] drm/doc: add new dp helpers into drm DocBook Date: Wed, 31 Oct 2012 11:01:37 +0100 Message-Id: <1351677697-13953-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1351677697-13953-1-git-send-email-daniel.vetter@ffwll.ch> References: <1351674710-11629-1-git-send-email-daniel.vetter@ffwll.ch> <1351677697-13953-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQksO+u2lmLCFt/CsYatPe0x7Q52xIKDSuz5JalRFi4xd3FG4lfMDjOcX+7WBXCMr1U94V4U Cc: Daniel Vetter , Laurent Pinchart X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org I didn't bother with documenting the really trivial new "extract something from dpcd" helpers, but the i2c over aux ch is now documented a bit. v2: Clarify the comment for i2c_dp_aux_add_bus a bit. Signed-off-by: Daniel Vetter --- Documentation/DocBook/drm.tmpl | 6 ++++++ drivers/gpu/drm/drm_dp_helper.c | 21 +++++++++++++++++++++ include/drm/drm_dp_helper.h | 7 +++++++ 3 files changed, 34 insertions(+) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 15729eb..71edb57 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl @@ -2115,6 +2115,12 @@ void intel_crt_init(struct drm_device *dev) !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers !Edrivers/gpu/drm/drm_fb_helper.c + + Display Port Helper Functions Reference +!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers +!Iinclude/drm/drm_dp_helper.h +!Edrivers/gpu/drm/drm_dp_helper.c + diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 3c4cccd..77dbbaf 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -30,6 +30,15 @@ #include #include +/** + * DOC: dp helpers + * + * These functions contain some common logic and helpers at various abstraction + * levels to deal with Display Port sink devices and related things like DP aux + * channel transfers, EDID reading over DP aux channels, decoding certain DPCD + * blocks, ... + */ + /* Run a single AUX_CH I2C transaction, writing/reading data as necessary */ static int i2c_algo_dp_aux_transaction(struct i2c_adapter *adapter, int mode, @@ -193,6 +202,18 @@ i2c_dp_aux_prepare_bus(struct i2c_adapter *adapter) return 0; } +/** + * i2c_dp_aux_add_bus() - register a i2c adaptar using the aux ch helper + * @adapter: i2c adapter to register + * + * This registers an i2c adapater that uses dp aux channel as it's underlaying + * transport. The driver needs to fill out the &i2c_algo_dp_aux_data structure + * and store it in the algo_data member of the @adapter argument. This will be + * used by the the i2c over dp aux algo to drive the hardware. + * + * RETURNS: + * 0 on success, -ERRNO on failure. + */ int i2c_dp_aux_add_bus(struct i2c_adapter *adapter) { diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index c09d367..3f94ede 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -312,6 +312,13 @@ #define MODE_I2C_READ 4 #define MODE_I2C_STOP 8 +/** + * struct i2c_algo_dp_aux_data - driver interface structure for i2c over dp aux algo + * @running: set by the algo indicating whether an i2c is ongoing or whether the + * i2c bus is quiescent + * @address: i2c target address for the currently ongoing transfer + * @aux_ch: driver callback to transfer a single byte of the i2c payload + */ struct i2c_algo_dp_aux_data { bool running; u16 address;