Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1740438rwi; Wed, 19 Oct 2022 14:56:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FjqKR4o+YyEf/MyuIB832bOUF/Pu4Zdt7u9Xp7Q2vrkdY13sv7kRtsRYYncPNc2jgBW6E X-Received: by 2002:a17:903:1d1:b0:17f:6494:f8c3 with SMTP id e17-20020a17090301d100b0017f6494f8c3mr10460375plh.157.1666216592590; Wed, 19 Oct 2022 14:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666216592; cv=none; d=google.com; s=arc-20160816; b=AXgsTPC+YxD9fxrvqJMxaVeKFWDXoQvJqXeEF7jZNlp4Q2Vi2qlYoiPNCC3JQBrc/k 2WunYx9DdTdZL8KnRF+KZif1DauUeeOdMVj6mrtGF8fvGynhrLZjeWmIVnIGWwTaqYHS NJZVKYMyyc2Rs6VjWoUMZ8GacyZlrdE8nibriH/ROwF/+WGgdDPax8IrZkmRDlUb2vCU XPw6OWSZJEVH9xdIdU/Uv3pwvm+9rvsYH3NZwcUB4LntvoC0fLB07malDtm6Aa841VYn Fsd321Ee85iL/BAD2V2OfIfnCK7dB6UkJoYy2PNKnaXRhJlrTrRfeHJV5500/m9JBE64 g7xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language:cc:to :subject:from:user-agent:mime-version:date:message-id:dkim-signature; bh=yiqpubSSRjqi+xo3Zt6mRBDg4WQe+McsHWUueSRR8rc=; b=v56QV8+4ShrN3pfRvlqIiYiEKq3gkIHbvQQ88ymhD5c8WfZCDkM6MUmIb+EUlC9+Oz 6vsL1ILA3RWWIL3QF3dKDS4I45N3KS17SyuGPRDXXy2JvINTpyDdr2IfLdKRRpvo5bTd 8+qSctVufYWrtfkH6dUsY22WJIirj3Y51ITb5GF+dLqAQxK/DxwjWmMiWDsl0xQavThy IWPQKzK3aGvTaVDtN8WjCxM5Z4ajag25rqkpWer1gJeSzFdzsO5M3Al4qciaNYjZ4uqo q6/vHZk/G2rhrvaAOZQ9D9fb476kL36Uc87D3LFOwyX6VqrKOtvHNOImcgkhgcPyivhd Ping== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZVPAHbEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi17-20020a17090b1e5100b0020a47a4c951si1181741pjb.147.2022.10.19.14.55.58; Wed, 19 Oct 2022 14:56:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZVPAHbEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbiJSVfS (ORCPT + 99 others); Wed, 19 Oct 2022 17:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbiJSVfM (ORCPT ); Wed, 19 Oct 2022 17:35:12 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EFFD107A9F for ; Wed, 19 Oct 2022 14:35:07 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id a67so27128828edf.12 for ; Wed, 19 Oct 2022 14:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:cc:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=yiqpubSSRjqi+xo3Zt6mRBDg4WQe+McsHWUueSRR8rc=; b=ZVPAHbECm9m1eYbMBBh9dm9FZ/PRwITiBRs6KLA8kM4fWSiN6WK8hRCLJA3OYDEkrm ajNYPk9TcK/15qfelg34GMb1JG5u6n68n4/ipxOk0IqHwLoTULy3Wxv/iqWvsR0oBjjn 9ynUYvg6TuCuclTLiQ3uctoTFs6UQkUCRuz4qMOV0dMPouTfTaYNqDq+Jywr4gFmAg8x dfFIODgyW5KcsvbZyrGeFA9B5ZgfmmxKwD4UQXIZL0owjwst7MYYXyPsbjGMVo8k61DI P1ZBdj9Zn38YNki9eyU0x1HVKadKQdTzYQYQtAyyPzIJlQJmxBpnHRk5qChQ8D1jwO0z aQVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:cc:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=yiqpubSSRjqi+xo3Zt6mRBDg4WQe+McsHWUueSRR8rc=; b=rO7gUT781RriFTE1krvxu3hRc1/yOdvfnMXKpyLGqIJmQOfubn4tUdHbuyW8MYueVt 4CLvuF3MLf+bfp5ID4+KjtgHJEuSXtBEUMBJLsJF2tTB65sGCGN39rOTcJrA8GeZPqHm NE/uFi+30atI5dYLH+BSqySrnwtACpgo4hbZHhmee4znDUB5EookT/oP6Pwd6q1HAntn 0H3+r2aBTYuySDkgEqVQmfspN8Ud4ealhRjG1WkZLGrCtp8UZjBra74yds/Apgsf4bid BpOnlqW+AbMsgQEmw7XJ38jbAs5gJeeME+KOgxy+ylVFMmi7xxTSfEecS0Yc72AAkKh/ VRZg== X-Gm-Message-State: ACrzQf1ipZQoWL3jt6wz5Vjq12ex2iFV0RpRUJxgnMGrHWJPCkp6AEl1 5bCHUSc21Thc/WTHI1jakdl/C6QP16U= X-Received: by 2002:a05:6402:360d:b0:459:5f40:5b0a with SMTP id el13-20020a056402360d00b004595f405b0amr9017951edb.168.1666215305362; Wed, 19 Oct 2022 14:35:05 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id bs15-20020a170906d1cf00b0077958ddaec6sm9232118ejb.186.2022.10.19.14.35.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 14:35:04 -0700 (PDT) Message-ID: Date: Wed, 19 Oct 2022 23:35:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 From: Johan Jonker Subject: [PATCH v1] drm: rockchip: remove rockchip_drm_framebuffer_init() function To: john@metanate.com Cc: heiko@sntech.de, hjc@rock-chips.com, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function rockchip_drm_framebuffer_init() was in use in the rockchip_drm_fbdev.c file, but that is now replaced by a generic fbdev setup. Reduce the image size by removing the rockchip_drm_framebuffer_init() and sub function rockchip_fb_alloc() and cleanup the rockchip_drm_fb.h header file. Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 43 ---------------------- drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 6 --- 2 files changed, 49 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c index 092bf863110b..409eaa1bf092 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c @@ -25,35 +25,6 @@ static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { .dirty = drm_atomic_helper_dirtyfb, }; -static struct drm_framebuffer * -rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd, - struct drm_gem_object **obj, unsigned int num_planes) -{ - struct drm_framebuffer *fb; - int ret; - int i; - - fb = kzalloc(sizeof(*fb), GFP_KERNEL); - if (!fb) - return ERR_PTR(-ENOMEM); - - drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); - - for (i = 0; i < num_planes; i++) - fb->obj[i] = obj[i]; - - ret = drm_framebuffer_init(dev, fb, &rockchip_drm_fb_funcs); - if (ret) { - DRM_DEV_ERROR(dev->dev, - "Failed to initialize framebuffer: %d\n", - ret); - kfree(fb); - return ERR_PTR(ret); - } - - return fb; -} - static const struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = { .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm, }; @@ -106,20 +77,6 @@ static const struct drm_mode_config_funcs rockchip_drm_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -struct drm_framebuffer * -rockchip_drm_framebuffer_init(struct drm_device *dev, - const struct drm_mode_fb_cmd2 *mode_cmd, - struct drm_gem_object *obj) -{ - struct drm_framebuffer *fb; - - fb = rockchip_fb_alloc(dev, mode_cmd, &obj, 1); - if (IS_ERR(fb)) - return ERR_CAST(fb); - - return fb; -} - void rockchip_drm_mode_config_init(struct drm_device *dev) { dev->mode_config.min_width = 0; diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.h b/drivers/gpu/drm/rockchip/rockchip_drm_fb.h index 1a696521096d..bae4e079dfb1 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.h @@ -7,11 +7,5 @@ #ifndef _ROCKCHIP_DRM_FB_H #define _ROCKCHIP_DRM_FB_H -struct drm_framebuffer * -rockchip_drm_framebuffer_init(struct drm_device *dev, - const struct drm_mode_fb_cmd2 *mode_cmd, - struct drm_gem_object *obj); -void rockchip_drm_framebuffer_fini(struct drm_framebuffer *fb); - void rockchip_drm_mode_config_init(struct drm_device *dev); #endif /* _ROCKCHIP_DRM_FB_H */ -- 2.20.1