From nobody Wed Apr 13 23:09:55 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EB8731B415F5; Wed, 13 Apr 2022 23:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kdywh1GYxz4mH7; Wed, 13 Apr 2022 23:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6kVy3HLeP8h2HihFveXiI1K/1j6dA7s2FuUmPdMfkcQ=; b=gsvdZEHKOVnyiYuCVlD4b5uUsgiI4VBxmbwhQKbqH7DMX1TW3i2x8cI77fukNCdDIwKtGC zlawjm40H2zT82CwiOgehpd1lFOGNr+GrP+aZC0i1bVKsDDHEjCUI1kFh5lsh5+MRwavGN OwCnvhP4gVrrrf/auXquOnwn3W0UTvLW/GwBkR3JGqHtQwsNnoqUEs40rFY53OBP3ihPft g3ivDxpyouQqLgndaJkrQpq89VwqpvdLiF04dUiYLuLG8tcqpyu61GafqUPKa20TGCNAXh pZe0iTN0/kPgKGFoSVnJNfnqlXWmX/ar7VT+6bYhh9tXXJtHo32LjnrAQ+2NXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8303F14EF0; Wed, 13 Apr 2022 23:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23DN9tFe075015; Wed, 13 Apr 2022 23:09:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23DN9tmD075014; Wed, 13 Apr 2022 23:09:55 GMT (envelope-from git) Date: Wed, 13 Apr 2022 23:09:55 GMT Message-Id: <202204132309.23DN9tmD075014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 42278fc2e699 - main - drm2: Remove unused variables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42278fc2e699e21b4206011c06c323c557453eae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6kVy3HLeP8h2HihFveXiI1K/1j6dA7s2FuUmPdMfkcQ=; b=htUQewG2ifAJ4I7feR6TTnj9OqlgLtZMXUvytobnNAw87pz7T543SGdmwnNsa9/xn4Kl7V qTqsdzpvNyzprSn8cRndu48aiPrtRxr78FYNbs/CM6tIuC7ayxhgEr6KBF0TveKcyS0aTP baPCY/xRvTd6kVeWlJObCYOEuee6sirplyZ8/vi1quX6rzyvUPMK9BX5RkrEXgaCkAiOvK U+sFytbXfzLNAiAJ72OWvuafg+ZqJO2L4ONilL8pqqAu3UnMX6PxIjz3VRFF9G6xWCzcoI 3QBET7KLLhcyCyFJOoWtUdhAUu0iIxS41FJDBn+hkbVJTJNzycMeuZ5YumijmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649891396; a=rsa-sha256; cv=none; b=pTRLd5Pcw7PNagZx6im+NejdLPhXYTRRJVZK68ZoyK0D6FpHq4k2ZZ7z5CdknoQ9YCjG4X q7tYj5DtuHU0Vm2UwSSGikSwbEg/v6nSVN771XrfWtFc4M2DgJ2QORwePIx1za2CaxyEgB 2+7bE6TfNFqB9GInWwxk+GjMR3TIHLvHLJKhXyOQPbuRnq4rvNup/XzQFMGEIFsIx3s8fw r/XS72OcYrBQ2pGH7pX8b9i9oGV/Gn0dvgXyqJAOMTnMlRZ4TeJXRRq0yRQ8C5gZ4GylDI WiQ0C2tJf7a0/nOoIm/g8qQBQst+uKbiSBoIxu576DMgNNeLTkJrwFe2FXFp8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=42278fc2e699e21b4206011c06c323c557453eae commit 42278fc2e699e21b4206011c06c323c557453eae Author: John Baldwin AuthorDate: 2022-04-13 23:08:22 +0000 Commit: John Baldwin CommitDate: 2022-04-13 23:08:22 +0000 drm2: Remove unused variables. --- sys/dev/drm2/drm_fb_helper.c | 8 ++------ sys/dev/drm2/drm_global.c | 2 -- sys/dev/drm2/drm_modes.c | 24 ++++-------------------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/sys/dev/drm2/drm_fb_helper.c b/sys/dev/drm2/drm_fb_helper.c index 8cb913570c13..c5ec36724a35 100644 --- a/sys/dev/drm2/drm_fb_helper.c +++ b/sys/dev/drm2/drm_fb_helper.c @@ -1252,7 +1252,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, struct drm_connector *connector; struct drm_connector_helper_funcs *connector_funcs; struct drm_encoder *encoder; - struct drm_fb_helper_crtc *best_crtc; int my_score, best_score, score; struct drm_fb_helper_crtc **crtcs, *crtc; struct drm_fb_helper_connector *fb_helper_conn; @@ -1264,7 +1263,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, connector = fb_helper_conn->connector; best_crtcs[n] = NULL; - best_crtc = NULL; best_score = drm_pick_crtcs(fb_helper, best_crtcs, modes, n+1, width, height); if (modes[n] == NULL) return best_score; @@ -1313,7 +1311,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, score = my_score + drm_pick_crtcs(fb_helper, crtcs, modes, n + 1, width, height); if (score > best_score) { - best_crtc = crtc; best_score = score; memcpy(best_crtcs, crtcs, dev->mode_config.num_connector * @@ -1453,7 +1450,6 @@ EXPORT_SYMBOL(drm_fb_helper_initial_config); int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) { struct drm_device *dev = fb_helper->dev; - int count = 0; u32 max_width, max_height, bpp_sel; int bound = 0, crtcs_bound = 0; struct drm_crtc *crtc; @@ -1480,8 +1476,8 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) max_height = fb_helper->fb->height; bpp_sel = fb_helper->fb->bits_per_pixel; - count = drm_fb_helper_probe_connector_modes(fb_helper, max_width, - max_height); + drm_fb_helper_probe_connector_modes(fb_helper, max_width, + max_height); drm_setup_crtcs(fb_helper); sx_xunlock(&dev->mode_config.mutex); diff --git a/sys/dev/drm2/drm_global.c b/sys/dev/drm2/drm_global.c index 2778aac3a23c..2b1cc3193601 100644 --- a/sys/dev/drm2/drm_global.c +++ b/sys/dev/drm2/drm_global.c @@ -71,7 +71,6 @@ int drm_global_item_ref(struct drm_global_reference *ref) { int ret; struct drm_global_item *item = &glob[ref->global_type]; - void *object; sx_xlock(&item->mutex); if (item->refcount == 0) { @@ -90,7 +89,6 @@ int drm_global_item_ref(struct drm_global_reference *ref) } ++item->refcount; ref->object = item->object; - object = item->object; sx_xunlock(&item->mutex); return 0; out_err: diff --git a/sys/dev/drm2/drm_modes.c b/sys/dev/drm2/drm_modes.c index 5467be5ab44a..7c184d28d2bf 100644 --- a/sys/dev/drm2/drm_modes.c +++ b/sys/dev/drm2/drm_modes.c @@ -173,7 +173,7 @@ struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay, /* 3) Nominal HSync width (% of line period) - default 8 */ #define CVT_HSYNC_PERCENTAGE 8 unsigned int hblank_percentage; - int vsyncandback_porch, vback_porch, hblank; + int vsyncandback_porch, hblank; /* estimated the horizontal period */ tmp1 = HV_FACTOR * 1000000 - @@ -188,8 +188,6 @@ struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay, vsyncandback_porch = vsync + CVT_MIN_V_PORCH; else vsyncandback_porch = tmp1; - /* 10. Find number of lines in back porch */ - vback_porch = vsyncandback_porch - vsync; drm_mode->vtotal = vdisplay_rnd + 2 * vmargin + vsyncandback_porch + CVT_MIN_V_PORCH; /* 5) Definition of Horizontal blanking time limitation */ @@ -321,9 +319,8 @@ drm_gtf_mode_complex(struct drm_device *dev, int hdisplay, int vdisplay, int top_margin, bottom_margin; int interlace; unsigned int hfreq_est; - int vsync_plus_bp, vback_porch; - unsigned int vtotal_lines, vfieldrate_est, hperiod; - unsigned int vfield_rate, vframe_rate; + int vsync_plus_bp; + unsigned int vtotal_lines; int left_margin, right_margin; unsigned int total_active_pixels, ideal_duty_cycle; unsigned int hblank, total_pixels, pixel_freq; @@ -383,23 +380,10 @@ drm_gtf_mode_complex(struct drm_device *dev, int hdisplay, int vdisplay, /* [V SYNC+BP] = RINT(([MIN VSYNC+BP] * hfreq_est / 1000000)) */ vsync_plus_bp = MIN_VSYNC_PLUS_BP * hfreq_est / 1000; vsync_plus_bp = (vsync_plus_bp + 500) / 1000; - /* 9. Find the number of lines in V back porch alone: */ - vback_porch = vsync_plus_bp - V_SYNC_RQD; /* 10. Find the total number of lines in Vertical field period: */ vtotal_lines = vdisplay_rnd + top_margin + bottom_margin + vsync_plus_bp + GTF_MIN_V_PORCH; - /* 11. Estimate the Vertical field frequency: */ - vfieldrate_est = hfreq_est / vtotal_lines; - /* 12. Find the actual horizontal period: */ - hperiod = 1000000 / (vfieldrate_rqd * vtotal_lines); - - /* 13. Find the actual Vertical field frequency: */ - vfield_rate = hfreq_est / vtotal_lines; - /* 14. Find the Vertical frame frequency: */ - if (interlaced) - vframe_rate = vfield_rate / 2; - else - vframe_rate = vfield_rate; + /* 15. Find number of pixels in left margin: */ if (margins) left_margin = (hdisplay_rnd * GTF_MARGIN_PERCENTAGE + 500) /