From patchwork Fri Oct 12 02:06:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 12179 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C384523E57 for ; Fri, 12 Oct 2012 02:06:27 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7B787A1937E for ; Fri, 12 Oct 2012 02:06:27 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so1713840iag.11 for ; Thu, 11 Oct 2012 19:06:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=uwvAxXRfzvhaAP6d6hN6wy3WKjeCXvztbLi0lVgwUSw=; b=ZlVCiUs210uHU8YKaI+3cJ5OT3HCPUemnjuoiWZ335KvCBoroPUv0D6e32K0GO1gZE 4iDw1tEcYUv6X0GA4VJQ10boN+X0LUDKLCZz0ifCJ03j75XK2y6sMEylJEm6V2khZnxP FN1fnwTP4CZL/eZhVnRtAmFysOj+fcE5kY80OokP79QaPXbGCyEzCr4luMSc1y/c/+34 wJceSURf0/0CX1eLB02qVlRG4VmYEFD34kHOy0eDC2rfoRvnQJS10PvvgN34VI2k0Tzp +oNAVmHUQ/ASuxDTcP3gdJ5NT5HK7MSmHx1Cb/1Vg5AF6q10Kq6OM/ee3dJ3oV4pev2y UOvw== Received: by 10.50.236.72 with SMTP id us8mr779505igc.70.1350007587199; Thu, 11 Oct 2012 19:06:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp132381igt; Thu, 11 Oct 2012 19:06:26 -0700 (PDT) Received: by 10.60.169.170 with SMTP id af10mr2370460oec.17.1350007586678; Thu, 11 Oct 2012 19:06:26 -0700 (PDT) Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) by mx.google.com with ESMTPS id c7si6666952obv.132.2012.10.11.19.06.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 19:06:26 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.219.50 as permitted sender) client-ip=209.85.219.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.219.50 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-oa0-f50.google.com with SMTP id n16so2982909oag.37 for ; Thu, 11 Oct 2012 19:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=uwvAxXRfzvhaAP6d6hN6wy3WKjeCXvztbLi0lVgwUSw=; b=NQc/ElFyylPTdrZRod32TWph7i7h1PdlYDcDjQKmc7/JTEq8QCOirVKvLib8+kn8lj WetKlwjSeUx1I1n/r0EUaIMU3vFs3STycSVlOeYxqiBU8W8sfgRxbd/flVQeYe+EF+0Z UcGGqxhip3DGh2w13Z7C0jnZlrH5CtKpGbYshhU2hjbB0Pmj1oeyqGsQrGhmZl0OWEgc O6fYkhqLm52dpCgJFYOS84Y+wrNTAFxfrkw782fBnUQjJU+BPW5elb03xAwaPYXBb8+I 53b9PLfexMSCreK6vZxfUM0aFka6EEXagz5hIcjdFNGoP8nLPzLydwrjIsG/hjFLG7Rc ZCaw== Received: by 10.60.25.193 with SMTP id e1mr2311079oeg.87.1350007586541; Thu, 11 Oct 2012 19:06:26 -0700 (PDT) Received: from localhost (ppp-70-129-143-201.dsl.rcsntx.swbell.net. [70.129.143.201]) by mx.google.com with ESMTPS id v3sm4413710oee.0.2012.10.11.19.06.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 19:06:26 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, airlied@linux.ie, daniel.vetter@ffwll.ch, bskeggs@redhat.com, laurent.pinchart@ideasonboard.com, alexander.deucher@amd.com, alan@linux.intel.com, jakob@vmware.com, Rob Clark Subject: [PATCH 9/9] drm: remove legacy drm_connector_property fxns Date: Thu, 11 Oct 2012 21:06:02 -0500 Message-Id: <1350007562-22323-10-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350007562-22323-1-git-send-email-rob.clark@linaro.org> References: <1350007562-22323-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQmlBFYFhmmUIOy5nwJ5lUZchfwwUM5S2ezs6m41DyU3wjDqTOz3K/t9r2YutgeaLtoZvjQM From: Rob Clark Replace references to and remove the connector property fxns, which have been superseded with the more general object property fxns: + drm_connector_attach_property -> drm_object_attach_property + drm_connector_property_set_value -> drm_object_property_set_value + drm_connector_property_get_value -> drm_object_property_get_value Signed-off-by: Rob Clark Reviewed-by: Jani Nikula --- drivers/gpu/drm/drm_crtc.c | 31 +++++-------------------------- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_sysfs.c | 6 +++--- include/drm/drm_crtc.h | 8 -------- 4 files changed, 9 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 9c346a5..cee96f4 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -561,11 +561,11 @@ int drm_connector_init(struct drm_device *dev, dev->mode_config.num_connector++; if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL) - drm_connector_attach_property(connector, + drm_object_attach_property(&connector->base, dev->mode_config.edid_property, 0); - drm_connector_attach_property(connector, + drm_object_attach_property(&connector->base, dev->mode_config.dpms_property, 0); out: @@ -2917,27 +2917,6 @@ void drm_property_destroy(struct drm_device *dev, struct drm_property *property) } EXPORT_SYMBOL(drm_property_destroy); -void drm_connector_attach_property(struct drm_connector *connector, - struct drm_property *property, uint64_t init_val) -{ - drm_object_attach_property(&connector->base, property, init_val); -} -EXPORT_SYMBOL(drm_connector_attach_property); - -int drm_connector_property_set_value(struct drm_connector *connector, - struct drm_property *property, uint64_t value) -{ - return drm_object_property_set_value(&connector->base, property, value); -} -EXPORT_SYMBOL(drm_connector_property_set_value); - -int drm_connector_property_get_value(struct drm_connector *connector, - struct drm_property *property, uint64_t *val) -{ - return drm_object_property_get_value(&connector->base, property, val); -} -EXPORT_SYMBOL(drm_connector_property_get_value); - void drm_object_attach_property(struct drm_mode_object *obj, struct drm_property *property, uint64_t init_val) @@ -3174,7 +3153,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector, /* Delete edid, when there is none. */ if (!edid) { connector->edid_blob_ptr = NULL; - ret = drm_connector_property_set_value(connector, dev->mode_config.edid_property, 0); + ret = drm_object_property_set_value(&connector->base, dev->mode_config.edid_property, 0); return ret; } @@ -3182,7 +3161,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector, connector->edid_blob_ptr = drm_property_create_blob(connector->dev, size, edid); - ret = drm_connector_property_set_value(connector, + ret = drm_object_property_set_value(&connector->base, dev->mode_config.edid_property, connector->edid_blob_ptr->base.id); @@ -3246,7 +3225,7 @@ static int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, /* store the property value if successful */ if (!ret) - drm_connector_property_set_value(connector, property, value); + drm_object_property_set_value(&connector->base, property, value); return ret; } diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index b5d05f5..712b3e88 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -331,7 +331,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) for (j = 0; j < fb_helper->connector_count; j++) { connector = fb_helper->connector_info[j]->connector; connector->funcs->dpms(connector, dpms_mode); - drm_connector_property_set_value(connector, + drm_object_property_set_value(&connector->base, dev->mode_config.dpms_property, dpms_mode); } } diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 45ac8d6..1990b5d 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -182,7 +182,7 @@ static ssize_t dpms_show(struct device *device, uint64_t dpms_status; int ret; - ret = drm_connector_property_get_value(connector, + ret = drm_object_property_get_value(&connector->base, dev->mode_config.dpms_property, &dpms_status); if (ret) @@ -277,7 +277,7 @@ static ssize_t subconnector_show(struct device *device, return 0; } - ret = drm_connector_property_get_value(connector, prop, &subconnector); + ret = drm_object_property_get_value(&connector->base, prop, &subconnector); if (ret) return 0; @@ -318,7 +318,7 @@ static ssize_t select_subconnector_show(struct device *device, return 0; } - ret = drm_connector_property_get_value(connector, prop, &subconnector); + ret = drm_object_property_get_value(&connector->base, prop, &subconnector); if (ret) return 0; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 0f532d4..a45cdc2 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -917,12 +917,6 @@ extern void drm_mode_set_crtcinfo(struct drm_display_mode *p, extern void drm_mode_connector_list_update(struct drm_connector *connector); extern int drm_mode_connector_update_edid_property(struct drm_connector *connector, struct edid *edid); -extern int drm_connector_property_set_value(struct drm_connector *connector, - struct drm_property *property, - uint64_t value); -extern int drm_connector_property_get_value(struct drm_connector *connector, - struct drm_property *property, - uint64_t *value); extern int drm_object_property_set_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t val); @@ -937,8 +931,6 @@ extern void drm_framebuffer_reference(struct drm_framebuffer *fb); extern void drm_framebuffer_remove(struct drm_framebuffer *fb); extern void drm_framebuffer_cleanup(struct drm_framebuffer *fb); -extern void drm_connector_attach_property(struct drm_connector *connector, - struct drm_property *property, uint64_t init_val); extern void drm_object_attach_property(struct drm_mode_object *obj, struct drm_property *property, uint64_t init_val);