From patchwork Mon Sep 3 16:54:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10586167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C5675A4 for ; Mon, 3 Sep 2018 16:55:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C54928CDB for ; Mon, 3 Sep 2018 16:55:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30AAA28FE6; Mon, 3 Sep 2018 16:55:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CFA4428F5D for ; Mon, 3 Sep 2018 16:55:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF0266E2B3; Mon, 3 Sep 2018 16:55:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 932FD6E2AA for ; Mon, 3 Sep 2018 16:54:59 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id z27-v6so1225486edb.10 for ; Mon, 03 Sep 2018 09:54:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E/Viq/vk8oLVECyECf90Tr3EY2N7vTs6tECo1N3dKAE=; b=DXQ00iCCu9JIzB6YHh0Fq5T2h7oGoKv5mLD5hgCV0oaT/R4OSUhM7bdtT1ALL97XpQ 1KU0+kJPATqlwub9cfhacVu37aB6lzoyGcS+t4jyT5RFDxI3aOchDVq9/zIt1ZLY9s9e TR23SPJ18rt5PXOQIBKEvZhDmro3RwyRf8ZUjF7JsbHVke9mep1WQAGPEYEUwK9QrInt uBPswTRkpGiGjpEg4qbOtw/NV6zfRXgvVriK16M3GroWPO/pOLW1UhDTE55JGGdqPwD8 X+KGC2I5NllrUZlw/nVFxt2CrqvRNcx76v81qxXNNQOkrcKebQ/kTbt/IfHVMHztBi6+ WNfw== X-Gm-Message-State: APzg51CaQI6HRY5miKVRxk4KTJiQJUyrU0yUCk51nSX4Gi5tOxnvxH4a kd/+awvrs9y+DXSgYwMsDdviclFN2vgEXg== X-Google-Smtp-Source: ANB0VdbGFSJ4IxjgDQ/saaYbuNGoWDVwNFqBzd2kQLjVHe2f+g6cIQcAwuL8aMjbEVFN+ZER1y+leQ== X-Received: by 2002:aa7:cdc4:: with SMTP id h4-v6mr897459edw.314.1535993698280; Mon, 03 Sep 2018 09:54:58 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id u53-v6sm12777790edm.51.2018.09.03.09.54.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 09:54:57 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Mon, 3 Sep 2018 18:54:33 +0200 Message-Id: <20180903165439.24845-8-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165439.24845-1-daniel.vetter@ffwll.ch> References: <20180903165439.24845-1-daniel.vetter@ffwll.ch> Subject: [Intel-gfx] [PATCH 08/14] drm/amdgpu: Remove default best_encoder hook from DC X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Grodzovsky , "Leo \(Sunpeng\) Li" , Daniel Vetter , Intel Graphics Development , Shirish S , Tony Cheng , Alex Deucher , Daniel Vetter , Harry Wentland MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP For atomic driver this is the default, no need to reimplement it. We still need to keep the copypasta for not-atomic drivers though, since no one polished the legacy crtc helpers as much as the atomic ones. Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: Harry Wentland Cc: Andrey Grodzovsky Cc: Tony Cheng Cc: "Leo (Sunpeng) Li" Cc: Shirish S --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index af6adffba788..333f9904f135 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2794,28 +2794,6 @@ static const struct drm_connector_funcs amdgpu_dm_connector_funcs = { .atomic_get_property = amdgpu_dm_connector_atomic_get_property }; -static struct drm_encoder *best_encoder(struct drm_connector *connector) -{ - int enc_id = connector->encoder_ids[0]; - struct drm_mode_object *obj; - struct drm_encoder *encoder; - - DRM_DEBUG_DRIVER("Finding the best encoder\n"); - - /* pick the encoder ids */ - if (enc_id) { - obj = drm_mode_object_find(connector->dev, NULL, enc_id, DRM_MODE_OBJECT_ENCODER); - if (!obj) { - DRM_ERROR("Couldn't find a matching encoder for our connector\n"); - return NULL; - } - encoder = obj_to_encoder(obj); - return encoder; - } - DRM_ERROR("No encoder id\n"); - return NULL; -} - static int get_modes(struct drm_connector *connector) { return amdgpu_dm_connector_get_modes(connector); @@ -2934,7 +2912,6 @@ amdgpu_dm_connector_helper_funcs = { */ .get_modes = get_modes, .mode_valid = amdgpu_dm_connector_mode_valid, - .best_encoder = best_encoder }; static void dm_crtc_helper_disable(struct drm_crtc *crtc)