<commit_before>---
- name: kld | drm
  kld: name=drm load=yes boot=yes

- name: drm2 | kldload
  kld: name=drm2 load=yes boot=yes

# NOTE(seanc@): These tunables are contained in
# sys/dev/drm2/i915/i915_drv.c
- name: drm2 | /boot/loader.conf | enable_rc6
  lineinfile:
    dest: /boot/loader.conf
    regexp: '^([\s]*)drm\.i915\.enable_rc6([\s]*)='
    line: 'drm.i915.enable_rc6="7"'
    owner: root
    group: wheel
    mode: 0644

# NOTE(seanc@, 2015-06-14): This boot value for
# drm.i915.prefault_disable is uninitialized by the kernel, explicitly
# set to 0 at boot time.
- name: drm2 | /boot/loader.conf | defaults set to zero
  lineinfile:
    dest: /boot/loader.conf
    regexp: '^([\s]*){{ item }}([\s]*)='
    line: '{{ item }}="0"'
    owner: root
    group: wheel
    mode: 0644
  with_items:
    - drm.i915.intel_iommu_enabled
    - drm.i915.intel_iommu_gfx_mapped
    - drm.i915.lvds_downclock
    - drm.i915.prefault_disable

- name: drm2 | /boot/loader.conf | defaults set to -1
  lineinfile:
    dest: /boot/loader.conf
    regexp: '^([\s]*){{ item }}([\s]*)='
    line: '{{ item }}="-1"'
    owner: root
    group: wheel
    mode: 0644
  with_items:
    - drm.i915.semaphores

- name: drm2 | /boot/loader.conf | defaults set to 1
  lineinfile:
    dest: /boot/loader.conf
    regexp: '^([\s]*){{ item }}([\s]*)='
    line: '{{ item }}="1"'
    owner: root
    group: wheel
    mode: 0644
  with_items:
    - drm.i915.try_reset<commit_msg>Reduce a ton of boilerplate by using with_items more intelligently<commit_after>---
- name: kld | drm
  kld: name=drm load=yes boot=yes

- name: drm2 | kldload
  kld: name=drm2 load=yes boot=yes

# NOTE(seanc@, 2015-06-14): The boot value for drm.i915.prefault_disable is
# uninitialized by the kernel, explicitly set to 0 at boot time.
#
# NOTE(seanc@): enable_rc6 tunables is defined in
# sys/dev/drm2/i915/i915_drv.c
- name: drm2 | /boot/loader.conf | defaults
  lineinfile:
    dest: /boot/loader.conf
    regexp: '^([\s]*){{ item.k }}([\s]*)='
    line: '{{ item.k }}="{{ item.v }}"'
    owner: root
    group: wheel
    mode: 0644
  with_items:
    - { k: 'drm.i915.intel_iommu_enabled',    v:  '0' }
    - { k: 'drm.i915.intel_iommu_gfx_mapped', v:  '0' }
    - { k: 'drm.i915.lvds_downclock',         v:  '0' }
    - { k: 'drm.i915.prefault_disable',       v:  '0' }
    - { k: 'drm.i915.semaphores',             v: '-1' }
    - { k: 'drm.i915.try_reset',              v:  '1' }
    - { k: 'drm.i915.enable_rc6',             v:  '7' }
{'fraction_non_alphanumeric': 0.1736, 'fraction_numerical': 0.052, 'mean_word_length': 2.6193921852387843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5808407', 'n_tokens_mistral': 1099, 'n_tokens_neox': 999, 'n_words': 234}