From patchwork Wed Nov 6 22:43:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Glisse X-Patchwork-Id: 3149631 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 24C4CBEEB2 for ; Wed, 6 Nov 2013 22:44:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 111132062E for ; Wed, 6 Nov 2013 22:44:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 49D3A2062D for ; Wed, 6 Nov 2013 22:44:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3675EFA08B for ; Wed, 6 Nov 2013 14:44:34 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qe0-f52.google.com (mail-qe0-f52.google.com [209.85.128.52]) by gabe.freedesktop.org (Postfix) with ESMTP id E45EEF9FF2 for ; Wed, 6 Nov 2013 14:43:49 -0800 (PST) Received: by mail-qe0-f52.google.com with SMTP id w7so190288qeb.25 for ; Wed, 06 Nov 2013 14:43:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=N2hAaWLZS3pGrKvFjjGX4X0H5uzNMNX26N1reGrcWYo=; b=yizjkf7FrpHmGp53zgQjnX7UGYAWoHZJIEubaFZLAmZGxGwSpCbDT7qIlT3t10jjQu bF4LeUL1VBFd5lec580XwMJVh+w/g781RNbTpfRjk1VVFfqgIGKEVX96oKTyM/yOQFzJ j2kxn8Ch1maCDCECXfT/fkl+TH0dk6o4FYE8PGKtEM3bbDySKBiU+UpCOn13vPyRvO1/ 2YUywlwudEOlJDA4pgrAThIjrJjPDdOGR86PJH2QtIrj0oRaAi6MjFLhOAt16jyjRi4Y yZEABEf/zKinzbnVMz/Gpw07v1B4cBHS2R6cdnWUc14AUXzMJEHOCTf6XGisfvV/Hd9B Zp8Q== X-Received: by 10.224.115.81 with SMTP id h17mr9521880qaq.64.1383777829302; Wed, 06 Nov 2013 14:43:49 -0800 (PST) Received: from gmail.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by mx.google.com with ESMTPSA id a5sm2677865qae.2.2013.11.06.14.43.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 Nov 2013 14:43:48 -0800 (PST) Date: Wed, 6 Nov 2013 17:43:45 -0500 From: Jerome Glisse To: "Robin H. Johnson" Subject: Re: KMS/radeon regression: failure to set modes on CEDAR & TAHITI; v3.11 vs 3.12-rc5/rc7 Message-ID: <20131106224344.GB8378@gmail.com> References: <20131106171453.GF5763@orbis-terrarum.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Maling list - DRI developers 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 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no 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 On Wed, Nov 06, 2013 at 05:48:55PM +0000, Robin H. Johnson wrote: > On Wed, Nov 06, 2013 at 12:16:31PM -0500, Alex Deucher wrote: > > On Wed, Nov 6, 2013 at 12:14 PM, Robin H. Johnson wrote: > > > (Resending to dri-devel because the first one didn't make it). > > > > > > I apologize for not sending this sooner, but I wanted to be really sure that I > > > wasn't introducing the bug elsewhere, and I was lacking time to even narrow it > > > down this far. > > > > > > TL;DR: > > > 3.11 kernel does proper modeset for dual 1920x1200 outputs > > > 3.12-rc5/rc7 kernel fails to do proper modeset, blank screen after radeon loaded > > Can you bisect? > I have the next step in the bisect prepared (taking an educated guess > and deciding that rc1 was probably also bad, because the changes after > rc1 were minimal), but this is my primary box for getting work done; so > I haven't rebooted since writing my email and preparing that next > kernel. > Possible fix attached. Cheers, Jerome > -- > Robin Hugh Johnson > Gentoo Linux: Developer, Trustee & Infrastructure Lead > E-Mail : robbat2@gentoo.org > GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel From c3d9451b9183182678e5faa62622992dbff80cdf Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Wed, 6 Nov 2013 17:42:02 -0500 Subject: [PATCH] radeon/i2c: do not count reg index in number of i2c byte we are writting. Useless to count the register index in number of bytes we are writting. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/atombios_i2c.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c index deaf98c..0652ee0 100644 --- a/drivers/gpu/drm/radeon/atombios_i2c.c +++ b/drivers/gpu/drm/radeon/atombios_i2c.c @@ -56,8 +56,10 @@ static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, return -EINVAL; } args.ucRegIndex = buf[0]; - if (num > 1) - memcpy(&out, &buf[1], num - 1); + if (num > 1) { + num--; + memcpy(&out, &buf[1], num); + } args.lpI2CDataOut = cpu_to_le16(out); } else { if (num > ATOM_MAX_HW_I2C_READ) {