From patchwork Fri Apr 4 17:52:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 3939951 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 22D6FBFF02 for ; Fri, 4 Apr 2014 17:52:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 444B120394 for ; Fri, 4 Apr 2014 17:52:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4399220397 for ; Fri, 4 Apr 2014 17:52:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EF546EDD7; Fri, 4 Apr 2014 10:52:16 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F18B6EDD6 for ; Fri, 4 Apr 2014 10:52:14 -0700 (PDT) Received: by mail-qg0-f42.google.com with SMTP id q107so3769478qgd.29 for ; Fri, 04 Apr 2014 10:52:14 -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 :mime-version:content-type:content-transfer-encoding; bh=vFc8lFAr1n0RUajKxNaHrzwmtMD8qed2yyql1DlTdlw=; b=u2+ultfISbV6M4A22qXW6GWrdYbyqHEacaxWV+nisEafA44LjMgQ9jhF39PHvc/rAk NGBmfcdpbNkJC0CAHQpF2u9xmF6VJCbfnH+zJ4Rjszyt8a0U8R5kCNk1dNqvKpyYnMqG rXImKgRxy8m13acRAK7hEEKOaeAhFfWyb0KUd+mAYkt5C7XfHCFyvTKerACaBXnIQYy5 d5TzBv23cn55ouftaB3TY3WprVh404Y5ScqXLy6jxwHg2SQb1MBs0kFDEtSjMlN3HSD1 8/bL7zCp3sm9vYrp6kzGAzHNdNhvii52DJhWfCciiL1llHxqz9Wx5NKBDjTKZuG+YOoI 7X7Q== X-Received: by 10.140.97.137 with SMTP id m9mr4158186qge.95.1396633934673; Fri, 04 Apr 2014 10:52:14 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPSA id a17sm17533863qac.35.2014.04.04.10.52.14 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 04 Apr 2014 10:52:14 -0700 (PDT) From: Alex Deucher To: dri-devel@lists.freedesktop.org, jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com, treding@nvidia.com Subject: [PATCH 3/4] drm/dp/i2c: Update comments about common i2c over dp assumptions Date: Fri, 4 Apr 2014 13:52:05 -0400 Message-Id: <1396633926-10403-4-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1396633926-10403-1-git-send-email-alexander.deucher@amd.com> References: <1396633926-10403-1-git-send-email-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , Jani Nikula X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=ham 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 If you are using the common dp over i2c functionality, it is asumed that the aux transfer function does not modify the any of the msg structure other than the reply field. Doing so breaks the logic in the common code. Signed-off-by: Alex Deucher Cc: Ville Syrjälä Cc: Jani Nikula Cc: Thierry Reding Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_dp_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 125f84d..7a8c091 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -577,7 +577,9 @@ static u32 drm_dp_i2c_functionality(struct i2c_adapter *adapter) /* * Transfer a single I2C-over-AUX message and handle various error conditions, - * retrying the transaction as appropriate. + * retrying the transaction as appropriate. It is assumed that the + * aux->transfer function does not modify anything in the msg other than the + * reply field. */ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) {