Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Use str_yes_no()

Remove the local yesno() implementation and adopt the str_yes_no() from
linux/string_helpers.h.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220225234631.3725943-1-lucas.demarchi@intel.com

+201 -148
+12 -11
drivers/gpu/drm/i915/display/intel_display.c
··· 32 32 #include <linux/module.h> 33 33 #include <linux/dma-resv.h> 34 34 #include <linux/slab.h> 35 + #include <linux/string_helpers.h> 35 36 #include <linux/vga_switcheroo.h> 36 37 37 38 #include <drm/drm_atomic.h> ··· 2885 2884 "[CRTC:%d:%s] requested pixel clock (%d kHz) too high (max: %d kHz, double wide: %s)\n", 2886 2885 crtc->base.base.id, crtc->base.name, 2887 2886 pipe_mode->crtc_clock, clock_limit, 2888 - yesno(crtc_state->double_wide)); 2887 + str_yes_no(crtc_state->double_wide)); 2889 2888 return -EINVAL; 2890 2889 } 2891 2890 ··· 5262 5261 drm_dbg_kms(&i915->drm, 5263 5262 "[PLANE:%d:%s] fb: [NOFB], visible: %s\n", 5264 5263 plane->base.base.id, plane->base.name, 5265 - yesno(plane_state->uapi.visible)); 5264 + str_yes_no(plane_state->uapi.visible)); 5266 5265 return; 5267 5266 } 5268 5267 ··· 5270 5269 "[PLANE:%d:%s] fb: [FB:%d] %ux%u format = %p4cc modifier = 0x%llx, visible: %s\n", 5271 5270 plane->base.base.id, plane->base.name, 5272 5271 fb->base.id, fb->width, fb->height, &fb->format->format, 5273 - fb->modifier, yesno(plane_state->uapi.visible)); 5272 + fb->modifier, str_yes_no(plane_state->uapi.visible)); 5274 5273 drm_dbg_kms(&i915->drm, "\trotation: 0x%x, scaler: %d\n", 5275 5274 plane_state->hw.rotation, plane_state->scaler_id); 5276 5275 if (plane_state->uapi.visible) ··· 5293 5292 5294 5293 drm_dbg_kms(&dev_priv->drm, "[CRTC:%d:%s] enable: %s %s\n", 5295 5294 crtc->base.base.id, crtc->base.name, 5296 - yesno(pipe_config->hw.enable), context); 5295 + str_yes_no(pipe_config->hw.enable), context); 5297 5296 5298 5297 if (!pipe_config->hw.enable) 5299 5298 goto dump_planes; ··· 5301 5300 snprintf_output_types(buf, sizeof(buf), pipe_config->output_types); 5302 5301 drm_dbg_kms(&dev_priv->drm, 5303 5302 "active: %s, output_types: %s (0x%x), output format: %s\n", 5304 - yesno(pipe_config->hw.active), 5303 + str_yes_no(pipe_config->hw.active), 5305 5304 buf, pipe_config->output_types, 5306 5305 output_formats(pipe_config->output_format)); 5307 5306 ··· 5371 5370 intel_dump_dp_vsc_sdp(dev_priv, &pipe_config->infoframes.vsc); 5372 5371 5373 5372 drm_dbg_kms(&dev_priv->drm, "vrr: %s, vmin: %d, vmax: %d, pipeline full: %d, guardband: %d flipline: %d, vmin vblank: %d, vmax vblank: %d\n", 5374 - yesno(pipe_config->vrr.enable), 5373 + str_yes_no(pipe_config->vrr.enable), 5375 5374 pipe_config->vrr.vmin, pipe_config->vrr.vmax, 5376 5375 pipe_config->vrr.pipeline_full, pipe_config->vrr.guardband, 5377 5376 pipe_config->vrr.flipline, ··· 5413 5412 "pch pfit: " DRM_RECT_FMT ", %s, force thru: %s\n", 5414 5413 DRM_RECT_ARG(&pipe_config->pch_pfit.dst), 5415 5414 enableddisabled(pipe_config->pch_pfit.enabled), 5416 - yesno(pipe_config->pch_pfit.force_thru)); 5415 + str_yes_no(pipe_config->pch_pfit.force_thru)); 5417 5416 5418 5417 drm_dbg_kms(&dev_priv->drm, "ips: %i, double wide: %i\n", 5419 5418 pipe_config->ips_enabled, pipe_config->double_wide); ··· 6059 6058 if (current_config->name != pipe_config->name) { \ 6060 6059 pipe_config_mismatch(fastset, crtc, __stringify(name), \ 6061 6060 "(expected %s, found %s)", \ 6062 - yesno(current_config->name), \ 6063 - yesno(pipe_config->name)); \ 6061 + str_yes_no(current_config->name), \ 6062 + str_yes_no(pipe_config->name)); \ 6064 6063 ret = false; \ 6065 6064 } \ 6066 6065 } while (0) ··· 6076 6075 } else { \ 6077 6076 pipe_config_mismatch(fastset, crtc, __stringify(name), \ 6078 6077 "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)", \ 6079 - yesno(current_config->name), \ 6080 - yesno(pipe_config->name)); \ 6078 + str_yes_no(current_config->name), \ 6079 + str_yes_no(pipe_config->name)); \ 6081 6080 ret = false; \ 6082 6081 } \ 6083 6082 } while (0)
+37 -28
drivers/gpu/drm/i915/display/intel_display_debugfs.c
··· 3 3 * Copyright © 2020 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 7 + 6 8 #include <drm/drm_debugfs.h> 7 9 #include <drm/drm_fourcc.h> 8 10 ··· 55 53 wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm); 56 54 57 55 seq_printf(m, "Enabled by kernel parameter: %s\n", 58 - yesno(dev_priv->params.enable_ips)); 56 + str_yes_no(dev_priv->params.enable_ips)); 59 57 60 58 if (DISPLAY_VER(dev_priv) >= 8) { 61 59 seq_puts(m, "Currently: unknown\n"); ··· 263 261 bool enabled; 264 262 u32 val; 265 263 266 - seq_printf(m, "Sink support: %s", yesno(psr->sink_support)); 264 + seq_printf(m, "Sink support: %s", str_yes_no(psr->sink_support)); 267 265 if (psr->sink_support) 268 266 seq_printf(m, " [0x%02x]", intel_dp->psr_dpcd[0]); 269 267 seq_puts(m, "\n"); ··· 282 280 283 281 if (!psr->enabled) { 284 282 seq_printf(m, "PSR sink not reliable: %s\n", 285 - yesno(psr->sink_not_reliable)); 283 + str_yes_no(psr->sink_not_reliable)); 286 284 287 285 goto unlock; 288 286 } ··· 449 447 450 448 wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm); 451 449 452 - seq_printf(m, "fw loaded: %s\n", yesno(intel_dmc_has_payload(dev_priv))); 450 + seq_printf(m, "fw loaded: %s\n", 451 + str_yes_no(intel_dmc_has_payload(dev_priv))); 453 452 seq_printf(m, "path: %s\n", dmc->fw_path); 454 453 seq_printf(m, "Pipe A fw support: %s\n", 455 - yesno(GRAPHICS_VER(dev_priv) >= 12)); 456 - seq_printf(m, "Pipe A fw loaded: %s\n", yesno(dmc->dmc_info[DMC_FW_PIPEA].payload)); 457 - seq_printf(m, "Pipe B fw support: %s\n", yesno(IS_ALDERLAKE_P(dev_priv))); 458 - seq_printf(m, "Pipe B fw loaded: %s\n", yesno(dmc->dmc_info[DMC_FW_PIPEB].payload)); 454 + str_yes_no(GRAPHICS_VER(dev_priv) >= 12)); 455 + seq_printf(m, "Pipe A fw loaded: %s\n", 456 + str_yes_no(dmc->dmc_info[DMC_FW_PIPEA].payload)); 457 + seq_printf(m, "Pipe B fw support: %s\n", 458 + str_yes_no(IS_ALDERLAKE_P(dev_priv))); 459 + seq_printf(m, "Pipe B fw loaded: %s\n", 460 + str_yes_no(dmc->dmc_info[DMC_FW_PIPEB].payload)); 459 461 460 462 if (!intel_dmc_has_payload(dev_priv)) 461 463 goto out; ··· 584 578 const struct drm_property_blob *edid = intel_connector->base.edid_blob_ptr; 585 579 586 580 seq_printf(m, "\tDPCD rev: %x\n", intel_dp->dpcd[DP_DPCD_REV]); 587 - seq_printf(m, "\taudio support: %s\n", yesno(intel_dp->has_audio)); 581 + seq_printf(m, "\taudio support: %s\n", 582 + str_yes_no(intel_dp->has_audio)); 588 583 if (intel_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) 589 584 intel_panel_info(m, &intel_connector->panel); 590 585 ··· 598 591 { 599 592 bool has_audio = intel_connector->port->has_audio; 600 593 601 - seq_printf(m, "\taudio support: %s\n", yesno(has_audio)); 594 + seq_printf(m, "\taudio support: %s\n", str_yes_no(has_audio)); 602 595 } 603 596 604 597 static void intel_hdmi_info(struct seq_file *m, ··· 607 600 struct intel_encoder *intel_encoder = intel_attached_encoder(intel_connector); 608 601 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(intel_encoder); 609 602 610 - seq_printf(m, "\taudio support: %s\n", yesno(intel_hdmi->has_audio)); 603 + seq_printf(m, "\taudio support: %s\n", 604 + str_yes_no(intel_hdmi->has_audio)); 611 605 } 612 606 613 607 static void intel_lvds_info(struct seq_file *m, ··· 766 758 DRM_RECT_FP_FMT ", dst=" DRM_RECT_FMT ", rotation=%s\n", 767 759 fb->base.id, &fb->format->format, 768 760 fb->modifier, fb->width, fb->height, 769 - yesno(plane_state->uapi.visible), 761 + str_yes_no(plane_state->uapi.visible), 770 762 DRM_RECT_FP_ARG(&plane_state->uapi.src), 771 763 DRM_RECT_ARG(&plane_state->uapi.dst), 772 764 rot_str); ··· 805 797 &crtc_state->scaler_state.scalers[i]; 806 798 807 799 seq_printf(m, ", scalers[%d]: use=%s, mode=%x", 808 - i, yesno(sc->in_use), sc->mode); 800 + i, str_yes_no(sc->in_use), sc->mode); 809 801 } 810 802 seq_puts(m, "\n"); 811 803 } else { ··· 928 920 crtc->base.base.id, crtc->base.name); 929 921 930 922 seq_printf(m, "\tuapi: enable=%s, active=%s, mode=" DRM_MODE_FMT "\n", 931 - yesno(crtc_state->uapi.enable), 932 - yesno(crtc_state->uapi.active), 923 + str_yes_no(crtc_state->uapi.enable), 924 + str_yes_no(crtc_state->uapi.active), 933 925 DRM_MODE_ARG(&crtc_state->uapi.mode)); 934 926 935 927 seq_printf(m, "\thw: enable=%s, active=%s\n", 936 - yesno(crtc_state->hw.enable), yesno(crtc_state->hw.active)); 928 + str_yes_no(crtc_state->hw.enable), str_yes_no(crtc_state->hw.active)); 937 929 seq_printf(m, "\tadjusted_mode=" DRM_MODE_FMT "\n", 938 930 DRM_MODE_ARG(&crtc_state->hw.adjusted_mode)); 939 931 seq_printf(m, "\tpipe__mode=" DRM_MODE_FMT "\n", ··· 941 933 942 934 seq_printf(m, "\tpipe src size=%dx%d, dither=%s, bpp=%d\n", 943 935 crtc_state->pipe_src_w, crtc_state->pipe_src_h, 944 - yesno(crtc_state->dither), crtc_state->pipe_bpp); 936 + str_yes_no(crtc_state->dither), crtc_state->pipe_bpp); 945 937 946 938 intel_scaler_info(m, crtc); 947 939 ··· 957 949 intel_plane_info(m, crtc); 958 950 959 951 seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s\n", 960 - yesno(!crtc->cpu_fifo_underrun_disabled), 961 - yesno(!crtc->pch_fifo_underrun_disabled)); 952 + str_yes_no(!crtc->cpu_fifo_underrun_disabled), 953 + str_yes_no(!crtc->pch_fifo_underrun_disabled)); 962 954 963 955 crtc_updates_info(m, crtc, "\t"); 964 956 } ··· 1014 1006 seq_printf(m, "DPLL%i: %s, id: %i\n", i, pll->info->name, 1015 1007 pll->info->id); 1016 1008 seq_printf(m, " pipe_mask: 0x%x, active: 0x%x, on: %s\n", 1017 - pll->state.pipe_mask, pll->active_mask, yesno(pll->on)); 1009 + pll->state.pipe_mask, pll->active_mask, 1010 + str_yes_no(pll->on)); 1018 1011 seq_printf(m, " tracked hardware state:\n"); 1019 1012 seq_printf(m, " dpll: 0x%08x\n", pll->state.hw_state.dpll); 1020 1013 seq_printf(m, " dpll_md: 0x%08x\n", ··· 1057 1048 struct drm_i915_private *dev_priv = m->private; 1058 1049 1059 1050 seq_printf(m, "Isochronous Priority Control: %s\n", 1060 - yesno(dev_priv->ipc_enabled)); 1051 + str_yes_no(dev_priv->ipc_enabled)); 1061 1052 return 0; 1062 1053 } 1063 1054 ··· 1166 1157 drrs->type == SEAMLESS_DRRS_SUPPORT) 1167 1158 supported = true; 1168 1159 1169 - seq_printf(m, "\tDRRS Supported: %s\n", yesno(supported)); 1160 + seq_printf(m, "\tDRRS Supported: %s\n", str_yes_no(supported)); 1170 1161 } 1171 1162 drm_connector_list_iter_end(&conn_iter); 1172 1163 ··· 1750 1741 1751 1742 seq_printf(m, "Threshold: %d\n", hotplug->hpd_storm_threshold); 1752 1743 seq_printf(m, "Detected: %s\n", 1753 - yesno(delayed_work_pending(&hotplug->reenable_work))); 1744 + str_yes_no(delayed_work_pending(&hotplug->reenable_work))); 1754 1745 1755 1746 return 0; 1756 1747 } ··· 1824 1815 struct drm_i915_private *dev_priv = m->private; 1825 1816 1826 1817 seq_printf(m, "Enabled: %s\n", 1827 - yesno(dev_priv->hotplug.hpd_short_storm_enabled)); 1818 + str_yes_no(dev_priv->hotplug.hpd_short_storm_enabled)); 1828 1819 1829 1820 return 0; 1830 1821 } ··· 2219 2210 intel_dp = intel_attached_dp(to_intel_connector(connector)); 2220 2211 crtc_state = to_intel_crtc_state(crtc->state); 2221 2212 seq_printf(m, "DSC_Enabled: %s\n", 2222 - yesno(crtc_state->dsc.compression_enable)); 2213 + str_yes_no(crtc_state->dsc.compression_enable)); 2223 2214 seq_printf(m, "DSC_Sink_Support: %s\n", 2224 - yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); 2215 + str_yes_no(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd))); 2225 2216 seq_printf(m, "Force_DSC_Enable: %s\n", 2226 - yesno(intel_dp->force_dsc_en)); 2217 + str_yes_no(intel_dp->force_dsc_en)); 2227 2218 if (!intel_dp_is_edp(intel_dp)) 2228 2219 seq_printf(m, "FEC_Sink_Support: %s\n", 2229 - yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable))); 2220 + str_yes_no(drm_dp_sink_supports_fec(intel_dp->fec_capable))); 2230 2221 } while (try_again); 2231 2222 2232 2223 drm_modeset_drop_locks(&ctx);
+3 -3
drivers/gpu/drm/i915/display/intel_display_trace.h
··· 210 210 TP_printk("pipe %c, frame=%u, scanline=%u, wm %d/%d/%d, sr %s/%d/%d/%d, hpll %s/%d/%d/%d, fbc %s", 211 211 pipe_name(__entry->pipe), __entry->frame, __entry->scanline, 212 212 __entry->primary, __entry->sprite, __entry->cursor, 213 - yesno(__entry->cxsr), __entry->sr_plane, __entry->sr_cursor, __entry->sr_fbc, 214 - yesno(__entry->hpll), __entry->hpll_plane, __entry->hpll_cursor, __entry->hpll_fbc, 215 - yesno(__entry->fbc)) 213 + str_yes_no(__entry->cxsr), __entry->sr_plane, __entry->sr_cursor, __entry->sr_fbc, 214 + str_yes_no(__entry->hpll), __entry->hpll_plane, __entry->hpll_cursor, __entry->hpll_fbc, 215 + str_yes_no(__entry->fbc)) 216 216 ); 217 217 218 218 TRACE_EVENT(vlv_wm,
+7 -5
drivers/gpu/drm/i915/display/intel_dp.c
··· 29 29 #include <linux/i2c.h> 30 30 #include <linux/notifier.h> 31 31 #include <linux/slab.h> 32 + #include <linux/string_helpers.h> 32 33 #include <linux/timekeeping.h> 33 34 #include <linux/types.h> 34 35 ··· 2788 2787 drm_dbg_kms(&i915->drm, 2789 2788 "[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n", 2790 2789 encoder->base.base.id, encoder->base.name, 2791 - yesno(intel_dp_mst_source_support(intel_dp)), yesno(sink_can_mst), 2792 - yesno(i915->params.enable_dp_mst)); 2790 + str_yes_no(intel_dp_mst_source_support(intel_dp)), 2791 + str_yes_no(sink_can_mst), 2792 + str_yes_no(i915->params.enable_dp_mst)); 2793 2793 2794 2794 if (!intel_dp_mst_source_support(intel_dp)) 2795 2795 return; ··· 4377 4375 drm_dbg_kms(&i915->drm, 4378 4376 "[CONNECTOR:%d:%s] RGB->YcbCr conversion? %s, YCbCr 4:2:0 allowed? %s, YCbCr 4:4:4->4:2:0 conversion? %s\n", 4379 4377 connector->base.base.id, connector->base.name, 4380 - yesno(intel_dp->dfp.rgb_to_ycbcr), 4381 - yesno(connector->base.ycbcr_420_allowed), 4382 - yesno(intel_dp->dfp.ycbcr_444_to_420)); 4378 + str_yes_no(intel_dp->dfp.rgb_to_ycbcr), 4379 + str_yes_no(connector->base.ycbcr_420_allowed), 4380 + str_yes_no(intel_dp->dfp.ycbcr_444_to_420)); 4383 4381 } 4384 4382 4385 4383 static void
+3 -1
drivers/gpu/drm/i915/display/intel_fbc.c
··· 38 38 * forcibly disable it to allow proper screen updates. 39 39 */ 40 40 41 + #include <linux/string_helpers.h> 42 + 41 43 #include <drm/drm_fourcc.h> 42 44 43 45 #include "i915_drv.h" ··· 1746 1744 if (fbc->active) { 1747 1745 seq_puts(m, "FBC enabled\n"); 1748 1746 seq_printf(m, "Compressing: %s\n", 1749 - yesno(intel_fbc_is_compressing(fbc))); 1747 + str_yes_no(intel_fbc_is_compressing(fbc))); 1750 1748 } else { 1751 1749 seq_printf(m, "FBC disabled: %s\n", fbc->no_fbc_reason); 1752 1750 }
+2 -1
drivers/gpu/drm/i915/display/intel_hdmi.c
··· 30 30 #include <linux/hdmi.h> 31 31 #include <linux/i2c.h> 32 32 #include <linux/slab.h> 33 + #include <linux/string_helpers.h> 33 34 34 35 #include <drm/drm_atomic_helper.h> 35 36 #include <drm/drm_crtc.h> ··· 2629 2628 drm_dbg_kms(&dev_priv->drm, 2630 2629 "[CONNECTOR:%d:%s] scrambling=%s, TMDS bit clock ratio=1/%d\n", 2631 2630 connector->base.id, connector->name, 2632 - yesno(scrambling), high_tmds_clock_ratio ? 40 : 10); 2631 + str_yes_no(scrambling), high_tmds_clock_ratio ? 40 : 10); 2633 2632 2634 2633 /* Set TMDS bit clock ratio to 1/40 or 1/10, and enable/disable scrambling */ 2635 2634 return drm_scdc_set_high_tmds_clock_ratio(adapter,
+4 -2
drivers/gpu/drm/i915/display/intel_sprite.c
··· 30 30 * support. 31 31 */ 32 32 33 + #include <linux/string_helpers.h> 34 + 33 35 #include <drm/drm_atomic.h> 34 36 #include <drm/drm_atomic_helper.h> 35 37 #include <drm/drm_color_mgmt.h> ··· 98 96 99 97 if (src_x % hsub || src_w % hsub) { 100 98 drm_dbg_kms(&i915->drm, "src x/w (%u, %u) must be a multiple of %u (rotated: %s)\n", 101 - src_x, src_w, hsub, yesno(rotated)); 99 + src_x, src_w, hsub, str_yes_no(rotated)); 102 100 return -EINVAL; 103 101 } 104 102 105 103 if (src_y % vsub || src_h % vsub) { 106 104 drm_dbg_kms(&i915->drm, "src y/h (%u, %u) must be a multiple of %u (rotated: %s)\n", 107 - src_y, src_h, vsub, yesno(rotated)); 105 + src_y, src_h, vsub, str_yes_no(rotated)); 108 106 return -EINVAL; 109 107 } 110 108
+5 -4
drivers/gpu/drm/i915/gem/selftests/huge_pages.c
··· 5 5 */ 6 6 7 7 #include <linux/prime_numbers.h> 8 + #include <linux/string_helpers.h> 8 9 9 10 #include "i915_selftest.h" 10 11 ··· 805 804 if (vma->resource->page_sizes_gtt != expected_gtt) { 806 805 pr_err("gtt=%u, expected=%u, size=%zd, single=%s\n", 807 806 vma->resource->page_sizes_gtt, expected_gtt, 808 - obj->base.size, yesno(!!single)); 807 + obj->base.size, str_yes_no(!!single)); 809 808 err = -EINVAL; 810 809 break; 811 810 } ··· 961 960 if (vma->resource->page_sizes_gtt != expected_gtt) { 962 961 pr_err("gtt=%u, expected=%u, i=%d, single=%s\n", 963 962 vma->resource->page_sizes_gtt, 964 - expected_gtt, i, yesno(!!single)); 963 + expected_gtt, i, str_yes_no(!!single)); 965 964 err = -EINVAL; 966 965 goto out_vma_unpin; 967 966 } ··· 1648 1647 I915_SHRINK_WRITEBACK); 1649 1648 if (should_swap == i915_gem_object_has_pages(obj)) { 1650 1649 pr_err("unexpected pages mismatch, should_swap=%s\n", 1651 - yesno(should_swap)); 1650 + str_yes_no(should_swap)); 1652 1651 err = -EINVAL; 1653 1652 goto out_put; 1654 1653 } 1655 1654 1656 1655 if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) { 1657 1656 pr_err("unexpected residual page-size bits, should_swap=%s\n", 1658 - yesno(should_swap)); 1657 + str_yes_no(should_swap)); 1659 1658 err = -EINVAL; 1660 1659 goto out_put; 1661 1660 }
+4 -3
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
··· 5 5 */ 6 6 7 7 #include <linux/prime_numbers.h> 8 + #include <linux/string_helpers.h> 8 9 9 10 #include "gem/i915_gem_internal.h" 10 11 #include "gem/i915_gem_pm.h" ··· 701 700 pr_err("Failed to fill dword %lu [%lu/%lu] with gpu (%s) [full-ppgtt? %s], err=%d\n", 702 701 ndwords, dw, max_dwords(obj), 703 702 engine->name, 704 - yesno(i915_gem_context_has_full_ppgtt(ctx)), 703 + str_yes_no(i915_gem_context_has_full_ppgtt(ctx)), 705 704 err); 706 705 intel_context_put(ce); 707 706 kernel_context_close(ctx); ··· 835 834 pr_err("Failed to fill dword %lu [%lu/%lu] with gpu (%s) [full-ppgtt? %s], err=%d\n", 836 835 ndwords, dw, max_dwords(obj), 837 836 engine->name, 838 - yesno(i915_gem_context_has_full_ppgtt(ctx)), 837 + str_yes_no(i915_gem_context_has_full_ppgtt(ctx)), 839 838 err); 840 839 intel_context_put(ce); 841 840 kernel_context_close(ctx); ··· 1414 1413 pr_err("Failed to fill dword %lu [%lu/%lu] with gpu (%s) [full-ppgtt? %s], err=%d\n", 1415 1414 ndwords, dw, max_dwords(obj), 1416 1415 ce->engine->name, 1417 - yesno(i915_gem_context_has_full_ppgtt(ctx)), 1416 + str_yes_no(i915_gem_context_has_full_ppgtt(ctx)), 1418 1417 err); 1419 1418 i915_gem_context_unlock_engines(ctx); 1420 1419 goto out_file;
+5 -4
drivers/gpu/drm/i915/gt/intel_engine_cs.c
··· 3 3 * Copyright © 2016 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 7 + 6 8 #include <drm/drm_print.h> 7 9 8 10 #include "gem/i915_gem_context.h" ··· 1632 1630 u8 read, write; 1633 1631 1634 1632 drm_printf(m, "\tExeclist tasklet queued? %s (%s), preempt? %s, timeslice? %s\n", 1635 - yesno(test_bit(TASKLET_STATE_SCHED, 1636 - &engine->sched_engine->tasklet.state)), 1633 + str_yes_no(test_bit(TASKLET_STATE_SCHED, &engine->sched_engine->tasklet.state)), 1637 1634 enableddisabled(!atomic_read(&engine->sched_engine->tasklet.count)), 1638 1635 repr_timer(&engine->execlists.preempt), 1639 1636 repr_timer(&engine->execlists.timer)); ··· 1894 1893 1895 1894 drm_printf(m, "\tAwake? %d\n", atomic_read(&engine->wakeref.count)); 1896 1895 drm_printf(m, "\tBarriers?: %s\n", 1897 - yesno(!llist_empty(&engine->barrier_tasks))); 1896 + str_yes_no(!llist_empty(&engine->barrier_tasks))); 1898 1897 drm_printf(m, "\tLatency: %luus\n", 1899 1898 ewma__engine_latency_read(&engine->latency)); 1900 1899 if (intel_engine_supports_stats(engine)) ··· 1936 1935 drm_printf(m, "HWSP:\n"); 1937 1936 hexdump(m, engine->status_page.addr, PAGE_SIZE); 1938 1937 1939 - drm_printf(m, "Idle? %s\n", yesno(intel_engine_is_idle(engine))); 1938 + drm_printf(m, "Idle? %s\n", str_yes_no(intel_engine_is_idle(engine))); 1940 1939 1941 1940 intel_engine_print_breadcrumbs(engine, m); 1942 1941 }
+4 -3
drivers/gpu/drm/i915/gt/intel_execlists_submission.c
··· 107 107 * 108 108 */ 109 109 #include <linux/interrupt.h> 110 + #include <linux/string_helpers.h> 110 111 111 112 #include "i915_drv.h" 112 113 #include "i915_trace.h" ··· 1332 1331 } else if (timeslice_expired(engine, last)) { 1333 1332 ENGINE_TRACE(engine, 1334 1333 "expired:%s last=%llx:%lld, prio=%d, hint=%d, yield?=%s\n", 1335 - yesno(timer_expired(&execlists->timer)), 1334 + str_yes_no(timer_expired(&execlists->timer)), 1336 1335 last->fence.context, last->fence.seqno, 1337 1336 rq_prio(last), 1338 1337 sched_engine->queue_priority_hint, 1339 - yesno(timeslice_yield(execlists, last))); 1338 + str_yes_no(timeslice_yield(execlists, last))); 1340 1339 1341 1340 /* 1342 1341 * Consume this timeslice; ensure we start a new one. ··· 1424 1423 __i915_request_is_complete(rq) ? "!" : 1425 1424 __i915_request_has_started(rq) ? "*" : 1426 1425 "", 1427 - yesno(engine != ve->siblings[0])); 1426 + str_yes_no(engine != ve->siblings[0])); 1428 1427 1429 1428 WRITE_ONCE(ve->request, NULL); 1430 1429 WRITE_ONCE(ve->base.sched_engine->queue_priority_hint, INT_MIN);
+2 -1
drivers/gpu/drm/i915/gt/intel_gt_pm.c
··· 3 3 * Copyright © 2019 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 6 7 #include <linux/suspend.h> 7 8 8 9 #include "i915_drv.h" ··· 158 157 enum intel_engine_id id; 159 158 intel_wakeref_t wakeref; 160 159 161 - GT_TRACE(gt, "force:%s", yesno(force)); 160 + GT_TRACE(gt, "force:%s", str_yes_no(force)); 162 161 163 162 /* Use a raw wakeref to avoid calling intel_display_power_get early */ 164 163 wakeref = intel_runtime_pm_get(gt->uncore->rpm);
+27 -25
drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
··· 5 5 */ 6 6 7 7 #include <linux/seq_file.h> 8 + #include <linux/string_helpers.h> 8 9 9 10 #include "i915_drv.h" 10 11 #include "i915_reg.h" ··· 106 105 rcctl1 = intel_uncore_read(uncore, GEN6_RC_CONTROL); 107 106 108 107 seq_printf(m, "RC6 Enabled: %s\n", 109 - yesno(rcctl1 & (GEN7_RC_CTL_TO_MODE | 108 + str_yes_no(rcctl1 & (GEN7_RC_CTL_TO_MODE | 110 109 GEN6_RC_CTL_EI_MODE(1)))); 111 110 seq_printf(m, "Render Power Well: %s\n", 112 111 (pw_status & VLV_GTLC_PW_RENDER_STATUS_MASK) ? "Up" : "Down"); ··· 141 140 snb_pcode_read(i915, GEN6_PCODE_READ_RC6VIDS, &rc6vids, NULL); 142 141 143 142 seq_printf(m, "RC1e Enabled: %s\n", 144 - yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE)); 143 + str_yes_no(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE)); 145 144 seq_printf(m, "RC6 Enabled: %s\n", 146 - yesno(rcctl1 & GEN6_RC_CTL_RC6_ENABLE)); 145 + str_yes_no(rcctl1 & GEN6_RC_CTL_RC6_ENABLE)); 147 146 if (GRAPHICS_VER(i915) >= 9) { 148 147 seq_printf(m, "Render Well Gating Enabled: %s\n", 149 - yesno(gen9_powergate_enable & GEN9_RENDER_PG_ENABLE)); 148 + str_yes_no(gen9_powergate_enable & GEN9_RENDER_PG_ENABLE)); 150 149 seq_printf(m, "Media Well Gating Enabled: %s\n", 151 - yesno(gen9_powergate_enable & GEN9_MEDIA_PG_ENABLE)); 150 + str_yes_no(gen9_powergate_enable & GEN9_MEDIA_PG_ENABLE)); 152 151 } 153 152 seq_printf(m, "Deep RC6 Enabled: %s\n", 154 - yesno(rcctl1 & GEN6_RC_CTL_RC6p_ENABLE)); 153 + str_yes_no(rcctl1 & GEN6_RC_CTL_RC6p_ENABLE)); 155 154 seq_printf(m, "Deepest RC6 Enabled: %s\n", 156 - yesno(rcctl1 & GEN6_RC_CTL_RC6pp_ENABLE)); 155 + str_yes_no(rcctl1 & GEN6_RC_CTL_RC6pp_ENABLE)); 157 156 seq_puts(m, "Current RC state: "); 158 157 switch (gt_core_status & GEN6_RCn_MASK) { 159 158 case GEN6_RC0: ··· 177 176 } 178 177 179 178 seq_printf(m, "Core Power Down: %s\n", 180 - yesno(gt_core_status & GEN6_CORE_CPD_STATE_MASK)); 179 + str_yes_no(gt_core_status & GEN6_CORE_CPD_STATE_MASK)); 181 180 if (GRAPHICS_VER(i915) >= 9) { 182 181 seq_printf(m, "Render Power Well: %s\n", 183 182 (gen9_powergate_status & ··· 217 216 rstdbyctl = intel_uncore_read(uncore, RSTDBYCTL); 218 217 crstandvid = intel_uncore_read16(uncore, CRSTANDVID); 219 218 220 - seq_printf(m, "HD boost: %s\n", yesno(rgvmodectl & MEMMODE_BOOST_EN)); 219 + seq_printf(m, "HD boost: %s\n", 220 + str_yes_no(rgvmodectl & MEMMODE_BOOST_EN)); 221 221 seq_printf(m, "Boost freq: %d\n", 222 222 (rgvmodectl & MEMMODE_BOOST_FREQ_MASK) >> 223 223 MEMMODE_BOOST_FREQ_SHIFT); 224 224 seq_printf(m, "HW control enabled: %s\n", 225 - yesno(rgvmodectl & MEMMODE_HWIDLE_EN)); 225 + str_yes_no(rgvmodectl & MEMMODE_HWIDLE_EN)); 226 226 seq_printf(m, "SW control enabled: %s\n", 227 - yesno(rgvmodectl & MEMMODE_SWMODE_EN)); 227 + str_yes_no(rgvmodectl & MEMMODE_SWMODE_EN)); 228 228 seq_printf(m, "Gated voltage change: %s\n", 229 - yesno(rgvmodectl & MEMMODE_RCLK_GATE)); 229 + str_yes_no(rgvmodectl & MEMMODE_RCLK_GATE)); 230 230 seq_printf(m, "Starting frequency: P%d\n", 231 231 (rgvmodectl & MEMMODE_FSTART_MASK) >> MEMMODE_FSTART_SHIFT); 232 232 seq_printf(m, "Max P-state: P%d\n", ··· 236 234 seq_printf(m, "RS1 VID: %d\n", (crstandvid & 0x3f)); 237 235 seq_printf(m, "RS2 VID: %d\n", ((crstandvid >> 8) & 0x3f)); 238 236 seq_printf(m, "Render standby enabled: %s\n", 239 - yesno(!(rstdbyctl & RCX_SW_EXIT))); 237 + str_yes_no(!(rstdbyctl & RCX_SW_EXIT))); 240 238 seq_puts(m, "Current RS state: "); 241 239 switch (rstdbyctl & RSX_STATUS_MASK) { 242 240 case RSX_STATUS_ON: ··· 309 307 310 308 rpmodectl = intel_uncore_read(uncore, GEN6_RP_CONTROL); 311 309 drm_printf(p, "Video Turbo Mode: %s\n", 312 - yesno(rpmodectl & GEN6_RP_MEDIA_TURBO)); 310 + str_yes_no(rpmodectl & GEN6_RP_MEDIA_TURBO)); 313 311 drm_printf(p, "HW control enabled: %s\n", 314 - yesno(rpmodectl & GEN6_RP_ENABLE)); 312 + str_yes_no(rpmodectl & GEN6_RP_ENABLE)); 315 313 drm_printf(p, "SW control enabled: %s\n", 316 - yesno((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) == 317 - GEN6_RP_MEDIA_SW_MODE)); 314 + str_yes_no((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) == GEN6_RP_MEDIA_SW_MODE)); 318 315 319 316 vlv_punit_get(i915); 320 317 freq_sts = vlv_punit_read(i915, PUNIT_REG_GPU_FREQ_STS); ··· 418 417 pm_mask = intel_uncore_read(uncore, GEN6_PMINTRMSK); 419 418 420 419 drm_printf(p, "Video Turbo Mode: %s\n", 421 - yesno(rpmodectl & GEN6_RP_MEDIA_TURBO)); 420 + str_yes_no(rpmodectl & GEN6_RP_MEDIA_TURBO)); 422 421 drm_printf(p, "HW control enabled: %s\n", 423 - yesno(rpmodectl & GEN6_RP_ENABLE)); 422 + str_yes_no(rpmodectl & GEN6_RP_ENABLE)); 424 423 drm_printf(p, "SW control enabled: %s\n", 425 - yesno((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) == 426 - GEN6_RP_MEDIA_SW_MODE)); 424 + str_yes_no((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) == GEN6_RP_MEDIA_SW_MODE)); 427 425 428 426 drm_printf(p, "PM IER=0x%08x IMR=0x%08x, MASK=0x%08x\n", 429 427 pm_ier, pm_imr, pm_mask); ··· 542 542 intel_wakeref_t wakeref; 543 543 int gpu_freq, ia_freq; 544 544 545 - seq_printf(m, "LLC: %s\n", yesno(HAS_LLC(i915))); 545 + seq_printf(m, "LLC: %s\n", str_yes_no(HAS_LLC(i915))); 546 546 seq_printf(m, "%s: %uMB\n", edram ? "eDRAM" : "eLLC", 547 547 i915->edram_size_mb); 548 548 ··· 604 604 struct drm_i915_private *i915 = gt->i915; 605 605 struct intel_rps *rps = &gt->rps; 606 606 607 - seq_printf(m, "RPS enabled? %s\n", yesno(intel_rps_is_enabled(rps))); 608 - seq_printf(m, "RPS active? %s\n", yesno(intel_rps_is_active(rps))); 607 + seq_printf(m, "RPS enabled? %s\n", 608 + str_yes_no(intel_rps_is_enabled(rps))); 609 + seq_printf(m, "RPS active? %s\n", 610 + str_yes_no(intel_rps_is_active(rps))); 609 611 seq_printf(m, "GPU busy? %s, %llums\n", 610 - yesno(gt->awake), 612 + str_yes_no(gt->awake), 611 613 ktime_to_ms(intel_gt_get_awake_time(gt))); 612 614 seq_printf(m, "Boosts outstanding? %d\n", 613 615 atomic_read(&rps->num_waiters));
+2 -1
drivers/gpu/drm/i915/gt/intel_reset.c
··· 5 5 6 6 #include <linux/sched/mm.h> 7 7 #include <linux/stop_machine.h> 8 + #include <linux/string_helpers.h> 8 9 9 10 #include "display/intel_display.h" 10 11 #include "display/intel_overlay.h" ··· 138 137 { 139 138 bool banned = false; 140 139 141 - RQ_TRACE(rq, "guilty? %s\n", yesno(guilty)); 140 + RQ_TRACE(rq, "guilty? %s\n", str_yes_no(guilty)); 142 141 GEM_BUG_ON(__i915_request_is_complete(rq)); 143 142 144 143 rcu_read_lock(); /* protect the GEM context */
+9 -4
drivers/gpu/drm/i915/gt/intel_rps.c
··· 3 3 * Copyright © 2019 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 7 + 6 8 #include <drm/i915_drm.h> 7 9 8 10 #include "i915_drv.h" ··· 774 772 775 773 void intel_rps_mark_interactive(struct intel_rps *rps, bool interactive) 776 774 { 777 - GT_TRACE(rps_to_gt(rps), "mark interactive: %s\n", yesno(interactive)); 775 + GT_TRACE(rps_to_gt(rps), "mark interactive: %s\n", 776 + str_yes_no(interactive)); 778 777 779 778 mutex_lock(&rps->power.mutex); 780 779 if (interactive) { ··· 1282 1279 drm_WARN_ONCE(&i915->drm, (val & GPLLENABLE) == 0, 1283 1280 "GPLL not enabled\n"); 1284 1281 1285 - drm_dbg(&i915->drm, "GPLL enabled? %s\n", yesno(val & GPLLENABLE)); 1282 + drm_dbg(&i915->drm, "GPLL enabled? %s\n", 1283 + str_yes_no(val & GPLLENABLE)); 1286 1284 drm_dbg(&i915->drm, "GPU status: 0x%08x\n", val); 1287 1285 1288 1286 return rps_reset(rps); ··· 1384 1380 drm_WARN_ONCE(&i915->drm, (val & GPLLENABLE) == 0, 1385 1381 "GPLL not enabled\n"); 1386 1382 1387 - drm_dbg(&i915->drm, "GPLL enabled? %s\n", yesno(val & GPLLENABLE)); 1383 + drm_dbg(&i915->drm, "GPLL enabled? %s\n", 1384 + str_yes_no(val & GPLLENABLE)); 1388 1385 drm_dbg(&i915->drm, "GPU status: 0x%08x\n", val); 1389 1386 1390 1387 return rps_reset(rps); ··· 1777 1772 1778 1773 GT_TRACE(gt, 1779 1774 "pm_iir:%x, client_boost:%s, last:%d, cur:%x, min:%x, max:%x\n", 1780 - pm_iir, yesno(client_boost), 1775 + pm_iir, str_yes_no(client_boost), 1781 1776 adj, new_freq, min, max); 1782 1777 1783 1778 if (client_boost && new_freq < rps->boost_freq) {
+6 -3
drivers/gpu/drm/i915/gt/intel_sseu.c
··· 3 3 * Copyright © 2019 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 7 + 6 8 #include "i915_drv.h" 7 9 #include "intel_engine_regs.h" 8 10 #include "intel_gt_regs.h" ··· 702 700 drm_printf(p, "EU total: %u\n", sseu->eu_total); 703 701 drm_printf(p, "EU per subslice: %u\n", sseu->eu_per_subslice); 704 702 drm_printf(p, "has slice power gating: %s\n", 705 - yesno(sseu->has_slice_pg)); 703 + str_yes_no(sseu->has_slice_pg)); 706 704 drm_printf(p, "has subslice power gating: %s\n", 707 - yesno(sseu->has_subslice_pg)); 708 - drm_printf(p, "has EU power gating: %s\n", yesno(sseu->has_eu_pg)); 705 + str_yes_no(sseu->has_subslice_pg)); 706 + drm_printf(p, "has EU power gating: %s\n", 707 + str_yes_no(sseu->has_eu_pg)); 709 708 } 710 709 711 710 void intel_sseu_print_topology(const struct sseu_dev_info *sseu,
+6 -4
drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c
··· 4 4 * Copyright © 2020 Intel Corporation 5 5 */ 6 6 7 + #include <linux/string_helpers.h> 8 + 7 9 #include "i915_drv.h" 8 10 #include "intel_gt_debugfs.h" 9 11 #include "intel_gt_regs.h" ··· 228 226 if (!is_available_info) 229 227 return; 230 228 231 - seq_printf(m, " Has Pooled EU: %s\n", yesno(has_pooled_eu)); 229 + seq_printf(m, " Has Pooled EU: %s\n", str_yes_no(has_pooled_eu)); 232 230 if (has_pooled_eu) 233 231 seq_printf(m, " Min EU in pool: %u\n", sseu->min_eu_in_pool); 234 232 235 233 seq_printf(m, " Has Slice Power Gating: %s\n", 236 - yesno(sseu->has_slice_pg)); 234 + str_yes_no(sseu->has_slice_pg)); 237 235 seq_printf(m, " Has Subslice Power Gating: %s\n", 238 - yesno(sseu->has_subslice_pg)); 236 + str_yes_no(sseu->has_subslice_pg)); 239 237 seq_printf(m, " Has EU Power Gating: %s\n", 240 - yesno(sseu->has_eu_pg)); 238 + str_yes_no(sseu->has_eu_pg)); 241 239 } 242 240 243 241 /*
+2 -1
drivers/gpu/drm/i915/gt/selftest_timeline.c
··· 4 4 */ 5 5 6 6 #include <linux/prime_numbers.h> 7 + #include <linux/string_helpers.h> 7 8 8 9 #include "intel_context.h" 9 10 #include "intel_engine_heartbeat.h" ··· 210 209 211 210 if (__intel_timeline_sync_is_later(tl, ctx, p->seqno) != p->expected) { 212 211 pr_err("%s: %s(ctx=%llu, seqno=%u) expected passed %s but failed\n", 213 - name, p->name, ctx, p->seqno, yesno(p->expected)); 212 + name, p->name, ctx, p->seqno, str_yes_no(p->expected)); 214 213 return -EINVAL; 215 214 } 216 215
+2 -1
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
··· 4 4 */ 5 5 6 6 #include <linux/debugfs.h> 7 + #include <linux/string_helpers.h> 7 8 8 9 #include "gt/intel_gt.h" 9 10 #include "i915_drv.h" ··· 478 477 log->level = __get_default_log_level(log); 479 478 DRM_DEBUG_DRIVER("guc_log_level=%d (%s, verbose:%s, verbosity:%d)\n", 480 479 log->level, enableddisabled(log->level), 481 - yesno(GUC_LOG_LEVEL_IS_VERBOSE(log->level)), 480 + str_yes_no(GUC_LOG_LEVEL_IS_VERBOSE(log->level)), 482 481 GUC_LOG_LEVEL_TO_VERBOSITY(log->level)); 483 482 484 483 return 0;
+2 -1
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
··· 4 4 */ 5 5 6 6 #include <drm/drm_cache.h> 7 + #include <linux/string_helpers.h> 7 8 8 9 #include "i915_drv.h" 9 10 #include "i915_reg.h" ··· 719 718 720 719 drm_printf(p, "\tSLPC state: %s\n", slpc_get_state_string(slpc)); 721 720 drm_printf(p, "\tGTPERF task active: %s\n", 722 - yesno(slpc_tasks->status & SLPC_GTPERF_TASK_ENABLED)); 721 + str_yes_no(slpc_tasks->status & SLPC_GTPERF_TASK_ENABLED)); 723 722 drm_printf(p, "\tMax freq: %u MHz\n", 724 723 slpc_decode_max_freq(slpc)); 725 724 drm_printf(p, "\tMin freq: %u MHz\n",
+6 -4
drivers/gpu/drm/i915/gt/uc/intel_uc.c
··· 3 3 * Copyright © 2016-2019 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 7 + 6 8 #include "gt/intel_gt.h" 7 9 #include "gt/intel_reset.h" 8 10 #include "intel_guc.h" ··· 80 78 drm_dbg(&i915->drm, 81 79 "enable_guc=%d (guc:%s submission:%s huc:%s slpc:%s)\n", 82 80 i915->params.enable_guc, 83 - yesno(intel_uc_wants_guc(uc)), 84 - yesno(intel_uc_wants_guc_submission(uc)), 85 - yesno(intel_uc_wants_huc(uc)), 86 - yesno(intel_uc_wants_guc_slpc(uc))); 81 + str_yes_no(intel_uc_wants_guc(uc)), 82 + str_yes_no(intel_uc_wants_guc_submission(uc)), 83 + str_yes_no(intel_uc_wants_huc(uc)), 84 + str_yes_no(intel_uc_wants_guc_slpc(uc))); 87 85 88 86 if (i915->params.enable_guc == 0) { 89 87 GEM_BUG_ON(intel_uc_wants_guc(uc));
+11 -9
drivers/gpu/drm/i915/gt/uc/intel_uc_debugfs.c
··· 4 4 */ 5 5 6 6 #include <linux/debugfs.h> 7 + #include <linux/string_helpers.h> 8 + 7 9 #include <drm/drm_print.h> 8 10 9 11 #include "gt/intel_gt_debugfs.h" ··· 20 18 struct drm_printer p = drm_seq_file_printer(m); 21 19 22 20 drm_printf(&p, "[guc] supported:%s wanted:%s used:%s\n", 23 - yesno(intel_uc_supports_guc(uc)), 24 - yesno(intel_uc_wants_guc(uc)), 25 - yesno(intel_uc_uses_guc(uc))); 21 + str_yes_no(intel_uc_supports_guc(uc)), 22 + str_yes_no(intel_uc_wants_guc(uc)), 23 + str_yes_no(intel_uc_uses_guc(uc))); 26 24 drm_printf(&p, "[huc] supported:%s wanted:%s used:%s\n", 27 - yesno(intel_uc_supports_huc(uc)), 28 - yesno(intel_uc_wants_huc(uc)), 29 - yesno(intel_uc_uses_huc(uc))); 25 + str_yes_no(intel_uc_supports_huc(uc)), 26 + str_yes_no(intel_uc_wants_huc(uc)), 27 + str_yes_no(intel_uc_uses_huc(uc))); 30 28 drm_printf(&p, "[submission] supported:%s wanted:%s used:%s\n", 31 - yesno(intel_uc_supports_guc_submission(uc)), 32 - yesno(intel_uc_wants_guc_submission(uc)), 33 - yesno(intel_uc_uses_guc_submission(uc))); 29 + str_yes_no(intel_uc_supports_guc_submission(uc)), 30 + str_yes_no(intel_uc_wants_guc_submission(uc)), 31 + str_yes_no(intel_uc_uses_guc_submission(uc))); 34 32 35 33 return 0; 36 34 }
+9 -6
drivers/gpu/drm/i915/i915_debugfs.c
··· 28 28 29 29 #include <linux/sched/mm.h> 30 30 #include <linux/sort.h> 31 + #include <linux/string_helpers.h> 31 32 32 33 #include <drm/drm_debugfs.h> 33 34 ··· 456 455 struct drm_i915_private *dev_priv = node_to_i915(m->private); 457 456 struct intel_rps *rps = &to_gt(dev_priv)->rps; 458 457 459 - seq_printf(m, "RPS enabled? %s\n", yesno(intel_rps_is_enabled(rps))); 460 - seq_printf(m, "RPS active? %s\n", yesno(intel_rps_is_active(rps))); 461 - seq_printf(m, "GPU busy? %s\n", yesno(to_gt(dev_priv)->awake)); 458 + seq_printf(m, "RPS enabled? %s\n", 459 + str_yes_no(intel_rps_is_enabled(rps))); 460 + seq_printf(m, "RPS active? %s\n", 461 + str_yes_no(intel_rps_is_active(rps))); 462 + seq_printf(m, "GPU busy? %s\n", str_yes_no(to_gt(dev_priv)->awake)); 462 463 seq_printf(m, "Boosts outstanding? %d\n", 463 464 atomic_read(&rps->num_waiters)); 464 465 seq_printf(m, "Interactive? %d\n", READ_ONCE(rps->power.interactive)); ··· 493 490 seq_printf(m, "Runtime power status: %s\n", 494 491 enableddisabled(!dev_priv->power_domains.init_wakeref)); 495 492 496 - seq_printf(m, "GPU idle: %s\n", yesno(!to_gt(dev_priv)->awake)); 493 + seq_printf(m, "GPU idle: %s\n", str_yes_no(!to_gt(dev_priv)->awake)); 497 494 seq_printf(m, "IRQs disabled: %s\n", 498 - yesno(!intel_irqs_enabled(dev_priv))); 495 + str_yes_no(!intel_irqs_enabled(dev_priv))); 499 496 #ifdef CONFIG_PM 500 497 seq_printf(m, "Usage count: %d\n", 501 498 atomic_read(&dev_priv->drm.dev->power.usage_count)); ··· 525 522 wakeref = intel_runtime_pm_get(&i915->runtime_pm); 526 523 527 524 seq_printf(m, "GT awake? %s [%d], %llums\n", 528 - yesno(to_gt(i915)->awake), 525 + str_yes_no(to_gt(i915)->awake), 529 526 atomic_read(&to_gt(i915)->wakeref.count), 530 527 ktime_to_ms(intel_gt_get_awake_time(to_gt(i915)))); 531 528 seq_printf(m, "CS timestamp frequency: %u Hz, %d ns\n",
+5 -4
drivers/gpu/drm/i915/i915_gpu_error.c
··· 31 31 #include <linux/nmi.h> 32 32 #include <linux/pagevec.h> 33 33 #include <linux/scatterlist.h> 34 + #include <linux/string_helpers.h> 34 35 #include <linux/utsname.h> 35 36 #include <linux/zlib.h> 36 37 ··· 720 719 const struct intel_engine_coredump *ee; 721 720 int i; 722 721 723 - err_printf(m, "GT awake: %s\n", yesno(gt->awake)); 722 + err_printf(m, "GT awake: %s\n", str_yes_no(gt->awake)); 724 723 err_printf(m, "EIR: 0x%08x\n", gt->eir); 725 724 err_printf(m, "IER: 0x%08x\n", gt->ier); 726 725 for (i = 0; i < gt->ngtier; i++) ··· 828 827 struct intel_dmc *dmc = &m->i915->dmc; 829 828 830 829 err_printf(m, "DMC loaded: %s\n", 831 - yesno(intel_dmc_has_payload(m->i915) != 0)); 830 + str_yes_no(intel_dmc_has_payload(m->i915) != 0)); 832 831 err_printf(m, "DMC fw version: %d.%d\n", 833 832 DMC_VERSION_MAJOR(dmc->version), 834 833 DMC_VERSION_MINOR(dmc->version)); 835 834 } 836 835 837 - err_printf(m, "RPM wakelock: %s\n", yesno(error->wakelock)); 838 - err_printf(m, "PM suspended: %s\n", yesno(error->suspended)); 836 + err_printf(m, "RPM wakelock: %s\n", str_yes_no(error->wakelock)); 837 + err_printf(m, "PM suspended: %s\n", str_yes_no(error->suspended)); 839 838 840 839 if (error->gt) 841 840 err_print_gt(m, error->gt);
+4 -1
drivers/gpu/drm/i915/i915_params.c
··· 22 22 * IN THE SOFTWARE. 23 23 */ 24 24 25 + #include <linux/string_helpers.h> 26 + 25 27 #include <drm/drm_print.h> 26 28 27 29 #include "i915_params.h" ··· 213 211 const void *x) 214 212 { 215 213 if (!__builtin_strcmp(type, "bool")) 216 - drm_printf(p, "i915.%s=%s\n", name, yesno(*(const bool *)x)); 214 + drm_printf(p, "i915.%s=%s\n", name, 215 + str_yes_no(*(const bool *)x)); 217 216 else if (!__builtin_strcmp(type, "int")) 218 217 drm_printf(p, "i915.%s=%d\n", name, *(const int *)x); 219 218 else if (!__builtin_strcmp(type, "unsigned int"))
-5
drivers/gpu/drm/i915/i915_utils.h
··· 399 399 #define MBps(x) KBps(1000 * (x)) 400 400 #define GBps(x) ((u64)1000 * MBps((x))) 401 401 402 - static inline const char *yesno(bool v) 403 - { 404 - return v ? "yes" : "no"; 405 - } 406 - 407 402 static inline const char *onoff(bool v) 408 403 { 409 404 return v ? "on" : "off";
+5 -3
drivers/gpu/drm/i915/intel_device_info.c
··· 22 22 * 23 23 */ 24 24 25 + #include <linux/string_helpers.h> 26 + 25 27 #include <drm/drm_print.h> 26 28 #include <drm/i915_pciids.h> 27 29 ··· 112 110 drm_printf(p, "ppgtt-type: %d\n", info->ppgtt_type); 113 111 drm_printf(p, "dma_mask_size: %u\n", info->dma_mask_size); 114 112 115 - #define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, yesno(info->name)) 113 + #define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->name)) 116 114 DEV_INFO_FOR_EACH_FLAG(PRINT_FLAG); 117 115 #undef PRINT_FLAG 118 116 119 - #define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, yesno(info->display.name)) 117 + #define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name, str_yes_no(info->display.name)) 120 118 DEV_INFO_DISPLAY_FOR_EACH_FLAG(PRINT_FLAG); 121 119 #undef PRINT_FLAG 122 120 } ··· 402 400 struct drm_printer *p) 403 401 { 404 402 drm_printf(p, "Has logical contexts? %s\n", 405 - yesno(caps->has_logical_contexts)); 403 + str_yes_no(caps->has_logical_contexts)); 406 404 drm_printf(p, "scheduler: %x\n", caps->scheduler); 407 405 }
+6 -4
drivers/gpu/drm/i915/intel_dram.c
··· 3 3 * Copyright © 2020 Intel Corporation 4 4 */ 5 5 6 + #include <linux/string_helpers.h> 7 + 6 8 #include "i915_drv.h" 7 9 #include "i915_reg.h" 8 10 #include "intel_dram.h" ··· 138 136 drm_dbg_kms(&i915->drm, 139 137 "CH%u DIMM %c size: %u Gb, width: X%u, ranks: %u, 16Gb DIMMs: %s\n", 140 138 channel, dimm_name, dimm->size, dimm->width, dimm->ranks, 141 - yesno(skl_is_16gb_dimm(dimm))); 139 + str_yes_no(skl_is_16gb_dimm(dimm))); 142 140 } 143 141 144 142 static int ··· 167 165 skl_is_16gb_dimm(&ch->dimm_s); 168 166 169 167 drm_dbg_kms(&i915->drm, "CH%u ranks: %u, 16Gb DIMMs: %s\n", 170 - channel, ch->ranks, yesno(ch->is_16gb_dimm)); 168 + channel, ch->ranks, str_yes_no(ch->is_16gb_dimm)); 171 169 172 170 return 0; 173 171 } ··· 216 214 dram_info->symmetric_memory = intel_is_dram_symmetric(&ch0, &ch1); 217 215 218 216 drm_dbg_kms(&i915->drm, "Memory configuration is symmetric? %s\n", 219 - yesno(dram_info->symmetric_memory)); 217 + str_yes_no(dram_info->symmetric_memory)); 220 218 221 219 return 0; 222 220 } ··· 494 492 drm_dbg_kms(&i915->drm, "DRAM channels: %u\n", dram_info->num_channels); 495 493 496 494 drm_dbg_kms(&i915->drm, "Watermark level 0 adjustment needed: %s\n", 497 - yesno(dram_info->wm_lv_0_adjust_needed)); 495 + str_yes_no(dram_info->wm_lv_0_adjust_needed)); 498 496 } 499 497 500 498 static u32 gen9_edram_size_mb(struct drm_i915_private *i915, u32 cap)
+6 -4
drivers/gpu/drm/i915/intel_pm.c
··· 26 26 */ 27 27 28 28 #include <linux/module.h> 29 + #include <linux/string_helpers.h> 29 30 #include <linux/pm_runtime.h> 30 31 31 32 #include <drm/drm_atomic_helper.h> ··· 6192 6191 old_dbuf_state->enabled_slices, 6193 6192 new_dbuf_state->enabled_slices, 6194 6193 INTEL_INFO(dev_priv)->dbuf.slice_mask, 6195 - yesno(old_dbuf_state->joined_mbus), 6196 - yesno(new_dbuf_state->joined_mbus)); 6194 + str_yes_no(old_dbuf_state->joined_mbus), 6195 + str_yes_no(new_dbuf_state->joined_mbus)); 6197 6196 } 6198 6197 6199 6198 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { ··· 6695 6694 crtc->base.base.id, crtc->base.name, 6696 6695 dbuf_state->slices[pipe], dbuf_state->ddb[pipe].start, 6697 6696 dbuf_state->ddb[pipe].end, dbuf_state->active_pipes, 6698 - yesno(dbuf_state->joined_mbus)); 6697 + str_yes_no(dbuf_state->joined_mbus)); 6699 6698 } 6700 6699 6701 6700 dbuf_state->enabled_slices = dev_priv->dbuf.enabled_slices; ··· 7006 7005 "Initial HPLL watermarks: plane=%d, SR cursor=%d fbc=%d\n", 7007 7006 wm->hpll.plane, wm->hpll.cursor, wm->hpll.fbc); 7008 7007 drm_dbg_kms(&dev_priv->drm, "Initial SR=%s HPLL=%s FBC=%s\n", 7009 - yesno(wm->cxsr), yesno(wm->hpll_en), yesno(wm->fbc_en)); 7008 + str_yes_no(wm->cxsr), str_yes_no(wm->hpll_en), 7009 + str_yes_no(wm->fbc_en)); 7010 7010 } 7011 7011 7012 7012 void g4x_wm_sanitize(struct drm_i915_private *dev_priv)
+3 -1
drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c
··· 4 4 */ 5 5 6 6 #include <linux/debugfs.h> 7 + #include <linux/string_helpers.h> 8 + 7 9 #include <drm/drm_print.h> 8 10 9 11 #include "gt/intel_gt_debugfs.h" ··· 24 22 return 0; 25 23 } 26 24 27 - drm_printf(&p, "active: %s\n", yesno(intel_pxp_is_active(pxp))); 25 + drm_printf(&p, "active: %s\n", str_yes_no(intel_pxp_is_active(pxp))); 28 26 drm_printf(&p, "instance counter: %u\n", pxp->key_instance); 29 27 30 28 return 0;
+2 -1
drivers/gpu/drm/i915/selftests/i915_active.c
··· 5 5 */ 6 6 7 7 #include <linux/kref.h> 8 + #include <linux/string_helpers.h> 8 9 9 10 #include "gem/i915_gem_pm.h" 10 11 #include "gt/intel_gt.h" ··· 281 280 drm_printf(m, "active %ps:%ps\n", ref->active, ref->retire); 282 281 drm_printf(m, "\tcount: %d\n", atomic_read(&ref->count)); 283 282 drm_printf(m, "\tpreallocated barriers? %s\n", 284 - yesno(!llist_empty(&ref->preallocated_barriers))); 283 + str_yes_no(!llist_empty(&ref->preallocated_barriers))); 285 284 286 285 if (i915_active_acquire_if_busy(ref)) { 287 286 struct active_node *it, *n;