From patchwork Sat Aug 11 22:19:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Rankin X-Patchwork-Id: 1311721 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 DE1B13FC23 for ; Mon, 13 Aug 2012 10:18:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B91719F0BD for ; Mon, 13 Aug 2012 03:18:37 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id AB2E89E75B for ; Sat, 11 Aug 2012 15:19:02 -0700 (PDT) Received: by wibhq4 with SMTP id hq4so1836105wib.12 for ; Sat, 11 Aug 2012 15:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=cv43g+5N7OQwIkdMd/2Jc3ApVWQav2UF0QW6Kj+EOeQ=; b=WR/Ih+2ZMlFZRN5F89Ffq3HABjTZ7UM39i/1HuNwKgs2t11x68bjiIo1vChmDbzi92 +6wNqqmVg0BrfyNPIUBLRnmsWTBUuKL3rWKs33fak886fpoXoUlHwUVVaUiuFYl4GSCr Cp+/CBn6bujJKY0GFTsS0W32h/uh8KrNt7mXpASgmSf0/Rqic1ZL4Bng8l0yH8c0aXbp L8vIXxl5CiN4d6LkJXYokV8+FGoRWwjTTuSWD9TvveHiMFc70QvT3Js7V6PGrzJszCyL cy0Be546XJOMd0Qn046l1y8pVsKo/9LWAwH2rUeNKl4UqMa2dB2S3hoVWHWhELD7s7M4 +y1w== Received: by 10.217.6.12 with SMTP id x12mr3382863wes.176.1344723541604; Sat, 11 Aug 2012 15:19:01 -0700 (PDT) Received: from endgame.underworld (host86-180-155-98.range86-180.btcentralplus.com. [86.180.155.98]) by mx.google.com with ESMTPS id t7sm9481380wix.6.2012.08.11.15.19.00 (version=SSLv3 cipher=OTHER); Sat, 11 Aug 2012 15:19:01 -0700 (PDT) Message-ID: <5026DA54.5020302@googlemail.com> Date: Sat, 11 Aug 2012 23:19:00 +0100 From: Chris Rankin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org Subject: [PATCH] Fix hw_i2c option for RV280 and RV350. X-Mailman-Approved-At: Mon, 13 Aug 2012 03:12:12 -0700 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: , 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 Hi, I've been carrying this fix privately for far too long; without it, I cannot enable the hardware I2C for either of my Radeons RV280 or RV350. It does not fix the I2C for my rv100, which remains broken. The nature of the failure is that the display fails completely: [ 35.067825] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 230 [ 35.076023] Raw EDID: [ 35.078315] 00 ff ff ff ff ff ff 00 ff ff ff ff ff ff ff ff [ 35.084067] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 35.089820] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 35.095574] ff ff ff ff ff ff ff ff ff 00 00 ff ff ff ff ff [ 35.101328] ff ff 1e 1e ff ff ff ff ff ff ff 6d 6d ff ff ff [ 35.107080] ff ff ff ff 3e 3e ff ff ff ff ff ff ff 4e 4e ff [ 35.112833] ff ff ff ff ff ff 9a 9a ff ff ff ff ff ff ff f7 [ 35.118587] f7 ff ff ff ff ff ff ff ff ff ff 02 02 ff ff ff [ 35.167737] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 142 Signed-off-by: Chris Rankin Cheers, Chris --- linux-3.5/drivers/gpu/drm/radeon/radeon_i2c.c.orig 2012-06-07 12:41:09.000000000 +0100 +++ linux-3.5/drivers/gpu/drm/radeon/radeon_i2c.c 2012-08-11 23:00:00.000000000 +0100 @@ -245,7 +245,7 @@ case CHIP_R300: case CHIP_R350: case CHIP_RV350: - i2c_clock = 60; + i2c_clock = 100; nm = (sclk * 10) / (i2c_clock * 4); for (loop = 1; loop < 255; loop++) { if ((nm / loop) < loop)