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: 10586175 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 720915A4 for ; Mon, 3 Sep 2018 16:55:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4937E28CDB for ; Mon, 3 Sep 2018 16:55:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D87528FE6; Mon, 3 Sep 2018 16:55:47 +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=unavailable 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 E976E28CDB for ; Mon, 3 Sep 2018 16:55:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AEBED6E2BC; Mon, 3 Sep 2018 16:55:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBA796E2B0 for ; Mon, 3 Sep 2018 16:54:59 +0000 (UTC) Received: by mail-ed1-x544.google.com with SMTP id s10-v6so1222228edb.11 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=NQNzIgubepuDIiXQLUxklG6DTPikiz1UpdRyTqw7/A5Bc1ctwzJx2fUGVGPtvVsDsl +C+ungN0iXqVHMKngxs/VzGPiqyGIMHkTFaxS5OXqTYcf2WzmMo0EoKCbtN443PdSbAf 0nK0MtORT7+M1VQxYXUbTsTIbtQb+tSxMPC5VD7diKWsI2cwwCv9iYM8U8HRDujuoA/i eZQQIAhUBhiSSdPykr1sLEiNuoLJj8f4IR5FvEI9aA5zhiJLrNtHwg0XLhji43YEhqSD DGAVJyocXCI1zfRStA8GjdAYupe++4HB0BWPOHKEtzzdg7XLsDDBQSlwIWU7Ye4eGNRj kclw== X-Gm-Message-State: APzg51CE5x/JciWigOItRhqj0VqRzLRP2vCfiW/cNNUYg7wj1pi2f1SO HWPo3yRNJS+jZmuozwcn6idxXGJ0jR20KA== 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 Subject: [PATCH 08/14] drm/amdgpu: Remove default best_encoder hook from DC 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> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Leo \(Sunpeng\) Li" , Daniel Vetter , Intel Graphics Development , Shirish S , Tony Cheng , Alex Deucher , Daniel Vetter MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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)