Return-Path: X-Original-To: mika.kuoppala@linux.intel.com Delivered-To: mika.kuoppala@linux.intel.com Received: from linux.jf.intel.com [10.23.219.25] by gaia with IMAP (fetchmail-6.3.21) for (single-drop); Wed, 24 Apr 2013 01:47:37 +0300 (EEST) Received: from orsmga002.jf.intel.com (orsmga002.jf.intel.com [10.7.209.21]) by linux.intel.com (Postfix) with ESMTP id D4BFE2C8001 for ; Tue, 23 Apr 2013 15:47:30 -0700 (PDT) Received: from orsmga101.jf.intel.com ([10.7.208.22]) by orsmga002-1.jf.intel.com with ESMTP; 23 Apr 2013 15:47:38 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtICAMwOd1GD/NKxk2dsb2JhbABQgzyDMbskDXgWDgEBAQEJCQsJFAQkgh8BAQEBBAEBFwEIBA0MAQEECh4MAgMBAgYCHwUCHgQEAgICAQEjAR8pBYgPDKp7coJAgQoBBX2NEwaBI4xBDIEtgkiBE4kSi0mDZYRpI44cgUoj X-IronPort-AV: E=Sophos;i="4.87,537,1363158000"; d="scan'208";a="63236113" Received: from gabe.freedesktop.org ([131.252.210.177]) by mtab.intel.com with ESMTP; 23 Apr 2013 15:47:37 -0700 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47FE0E5EE0 for ; Tue, 23 Apr 2013 15:47:37 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from oproxy6-pub.bluehost.com (oproxy6-pub.bluehost.com [67.222.54.6]) by gabe.freedesktop.org (Postfix) with SMTP id 1D38CE60F2 for ; Tue, 23 Apr 2013 15:46:44 -0700 (PDT) Received: (qmail 8952 invoked by uid 0); 23 Apr 2013 22:46:43 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by cpoproxy3.bluehost.com with SMTP; 23 Apr 2013 22:46:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject:To:From; bh=xw3Q3HR1b7GyqRjfvLCbR06K8zSyl8Ejaqtg135KK88=; b=Wpf5Yxp5ONDIbxJ/Mfk+5433UFsA9q/D4ptaLzP1osiEZwUe6/TSk0mm2QwcumfPD7wfXEMVb7SFTG09QEEx+KL8ExLmYJr60AMAbOskfQ0hroeXeZ5qH+4D+dtzyOHz; Received: from [67.161.37.189] (port=45365 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1UUlz1-0005up-1U for intel-gfx@lists.freedesktop.org; Tue, 23 Apr 2013 16:46:43 -0600 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Tue, 23 Apr 2013 15:46:41 -0700 Message-Id: <1366757201-5838-1-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] =?utf-8?q?=5BPATCH=5D_drm/i915=3A_init_hardware_to_a_?= =?utf-8?q?known_state_on_resume_v3?= X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: intel-gfx-bounces+mika.kuoppala=linux.intel.com@lists.freedesktop.org Errors-To: intel-gfx-bounces+mika.kuoppala=linux.intel.com@lists.freedesktop.org RnJvbTogWm91IE5hbmhhaSA8bmFuaGFpLnpvdUBpbnRlbC5jb20+CgpOZWVkZWQgb24gU05CIHRv IGF2b2lkIHNvbWUgUkM2IHJlbGF0ZWQgaGFuZ3MuCgp2MjogcmVtb3ZlIHVubmVlZGVkI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gICAgIENN RCgwLCAxLCAyKQorI2RlZmluZSBDTURfUElQRUxJTkVfU0VMRUNUICAgICAgICAgICAgICAgICAg ICAgQ01EKDEsIDEsIDQpCisKKyNkZWZpbmUgQ01EX0JJTkRJTkdfVEFCTEVfUE9JTlRFUlMgICAg ICAgICAgICAgIENNRCgzLCAwLCAxKQorIyBkZWZpbmUgR0VONl9CSU5ESU5HX1RBQkxFX01PRElG WV9QUyAgICAgICAgICAgKDEgPDwgMTIpLyogZm9yIEdFTjYgKi8KKyMgZGVmaW5lIEdFTjZfQklO RElOR19UQUJMRV9NT0RJRllfR1MgICAgICAgICAgICgxIDw8IDkpIC8qIGZvciBHRU42ICovCisj IGRlZmluZSBHRU42X0JJTkRJTkdfVEFCTEVfTU9ESUZZX1ZTICAgICAgICAgICAoMSA8PCA4KSAv KiBmb3IgR0VONiAqLworCisjZGVmaW5lIENNRF9WRVJURVhfQlVGRkVSUyAgICAgICAgICAgICAg ICAgICAgICBDTUQoMywgMCwgOCkKKyNkZWZpbmUgQ01EX1ZFUlRFWF9FTEVNRU5UUyAgICAgICAg ICAgICAgICAgICAgIENNRCgzLCAwLCA5KQorI2RlZmluZSBDTURfRFJBV0lOR19SRUNUQU5HTEUg ICAgICAgICAgICAgICAgICAgQ01EKDMsIDEsIDApCisjZGVmaW5lIENNRF8zRFBSSU1JVElWRSAg ICAgICAgICAgICAgICAgICAgICAgICBDTUQoMywgMywgMCkKKworI2RlZmluZSBDTURfREVQVEhf QlVGRkVSICAgICAgICAgICAgICAgICAgICAgICAgQ01EKDMsIDEsIDUpCisjIGRlZmluZSBDTURf REVQVEhfQlVGRkVSX1RZUEVfU0hJRlQgICAgICAgICAgICAyOQorIyBkZWZpbmUgQ01EX0RFUFRI X0JVRkZFUl9GT1JNQVRfU0hJRlQgICAgICAgICAgMTgKKworI2RlZmluZSBDTURfQ0xFQVJfUEFS QU1TICAgICAgICAgICAgICAgICAgICAgICAgQ01EKDMsIDEsIDB4MTApCisvKiBEVzEgKi8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X2VtaXQocmluZywgMCk7CisKKwlpbnRlbF9yaW5nX2VtaXQocmluZywgR0VONl8z RFNUQVRFX0dTIHwgKDcgLSAyKSk7CisJaW50ZWxfcmluZ19lbWl0KHJpbmcsIDApOworCWludGVs X3JpbmdfZW1pdChyaW5nLCAwKTsKKwlpbnRlbF9yaW5nX2VtaXQocmluZywgMCk7CisJaW50ZWxf cmluZ19lbWl0KHJpbmcsIDApOworCWludGVsX3JpbmdfZW1pdChyaW5nLCAoMTw8MTApKTsKKwlp bnRlbF9yaW5nX2VtaXQocmluZywgMCk7CisJaW50ZWxfcmluZ19hZHZhbmNlKHJpbmcpOworCXJl dHVybiAwOworfQorCitzdGF0aWMgaW50CitnZW42X2VtaXRfY2xpcF9zdGF0ZShzdHJ1Y3QgaW50 ZWxfcmluZ19idWZmZXIgKnJpbmcpCit7CisJaW50IHJldDsKKwlpZiAoKHJldCA9IGludGVsX3Jp bmdfYmVnaW4ocmluZywgNCkpICE9IDApCisJCXJldHVybiByZXQ7CisJaW50ZWxfcmluZ19lbWl0 KHJpbmcsIEdFTjZfM0RTVEFURV9DTElQIHwgKDQgLSAyKSk7CisJaW50ZWxfcmluZ19lbWl0KHJp bmcsIDE8PDEwKTsKKwlpbnRlbF9yaW5nX2VtaXQocmluZywgMCk7CisJaW50ZWxfcmluZ19lbWl0 KHJpbmcsIDApOworCWludGVsX3JpbmdfYWR2YW5jZShyaW5nKTsKKwlyZXR1cm4gMDsKK30KKwor c3RhdGljIGludAorZ2VuNl9lbWl0X3NmX3N0YXRlKHN0cnVjdCBpbnRlbF9yaW5nX2J1ZmZlciAq cmluZykKK3sKKwlpbnQgcmV0OworCWlmICgocmV0ID0gaW50ZWxfcmluZ19iZWdpbihyaW5nLCAy MCkpICE9IDApCisJCXJldHVybiByZXQ7CisJaW50ZWxfcmluZ19lbWl0KHJpbmcsIEdFTjZfM0RT VEFURV9TRiB8ICgyMCAtIDIpKTsKKwlpbnRlbF9yaW5nX2VtaXQocmluZywgKDEgPD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